Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
github: Add github actions
Browse files Browse the repository at this point in the history
This PR enables the github actions for agent repository.

Fixes #869

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
  • Loading branch information
GabyCT committed Dec 17, 2020
1 parent 25d7471 commit 09af1d8
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 34 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on: ["pull_request"]
name: Static checks
jobs:
test:
strategy:
matrix:
go-version: [1.13.x, 1.14.x, 1.15.x]
os: [ubuntu-18.04]
runs-on: ${{ matrix.os }}
env:
GO111MODULE: off
TRAVIS: "true"
TRAVIS_BRANCH: ${{ github.base_ref }}
TRAVIS_PULL_REQUEST_BRANCH: ${{ github.head_ref }}
TRAVIS_PULL_REQUEST_SHA : ${{ github.event.pull_request.head.sha }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Setup GOPATH
run: |
gopath_org=$(go env GOPATH)/src/github.com/kata-containers/
mkdir -p ${gopath_org}
ln -s ${PWD} ${gopath_org}
echo "TRAVIS_BRANCH: ${TRAVIS_BRANCH}"
echo "TRAVIS_PULL_REQUEST_BRANCH: ${TRAVIS_PULL_REQUEST_BRANCH}"
echo "TRAVIS_PULL_REQUEST_SHA: ${TRAVIS_PULL_REQUEST_SHA}"
echo "TRAVIS: ${TRAVIS}"
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup travis references
run: |
echo "TRAVIS_BRANCH=${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = \"/\" } ; { print $3 }')}"
- name: Setup
run: |
agent_repo=$(go env GOPATH)/src/github.com/kata-containers/agent
pushd ${agent_repo}
GOPATH=$(go env GOPATH) .ci/setup.sh
- name: Building
run: |
agent_repo=$(go env GOPATH)/src/github.com/kata-containers/agent
pushd ${agent_repo}
GOPATH=$(go env GOPATH) make
- name: Running tests
run: |
agent_repo=$(go env GOPATH)/src/github.com/kata-containers/agent
pushd ${agent_repo}
GOPATH=$(go env GOPATH) make test
- name: Running static checks
run: |
agent_repo=$(go env GOPATH)/src/github.com/kata-containers/agent
pushd ${agent_repo}
GOPATH=$(go env GOPATH) .ci/static-checks.sh
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

0 comments on commit 09af1d8

Please sign in to comment.