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

Commit 0fb409d

Browse files
committed
github: Add github actions
This PR enables the github actions for runtime repository. Fixes #3107 Signed-off-by: Gabriela Cervantes <[email protected]>
1 parent df055c8 commit 0fb409d

File tree

2 files changed

+60
-41
lines changed

2 files changed

+60
-41
lines changed

.github/workflows/main.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
on: ["pull_request"]
2+
name: Static checks
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
go-version: [1.13.x, 1.14.x, 1.15.x]
8+
os: [ubuntu-18.04]
9+
runs-on: ${{ matrix.os }}
10+
env:
11+
GO111MODULE: off
12+
TRAVIS: "true"
13+
TRAVIS_BRANCH: ${{ github.base_ref }}
14+
TRAVIS_PULL_REQUEST_BRANCH: ${{ github.head_ref }}
15+
TRAVIS_PULL_REQUEST_SHA : ${{ github.event.pull_request.head.sha }}
16+
steps:
17+
- name: Install Go
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: ${{ matrix.go-version }}
21+
- name: Setup GOPATH
22+
run: |
23+
gopath_org=$(go env GOPATH)/src/github.com/kata-containers/
24+
mkdir -p ${gopath_org}
25+
ln -s ${PWD} ${gopath_org}
26+
echo "TRAVIS_BRANCH: ${TRAVIS_BRANCH}"
27+
echo "TRAVIS_PULL_REQUEST_BRANCH: ${TRAVIS_PULL_REQUEST_BRANCH}"
28+
echo "TRAVIS_PULL_REQUEST_SHA: ${TRAVIS_PULL_REQUEST_SHA}"
29+
echo "TRAVIS: ${TRAVIS}"
30+
- name: Checkout code
31+
uses: actions/checkout@v2
32+
with:
33+
fetch-depth: 0
34+
- name: Setup travis references
35+
run: |
36+
echo "TRAVIS_BRANCH=${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = \"/\" } ; { print $3 }')}"
37+
- name: Install package dependencies
38+
run: |
39+
sudo apt-get update -qq
40+
sudo apt-get install -y -qq automake moreutils
41+
- name: Versions checker
42+
run: |
43+
runtime_repo=$(go env GOPATH)/src/github.com/kata-containers/runtime
44+
pushd ${runtime_repo}
45+
GOPATH=$(go env GOPATH) .ci/versions_checker.sh
46+
- name: Install yq
47+
run: |
48+
runtime_repo=$(go env GOPATH)/src/github.com/kata-containers/runtime
49+
pushd ${runtime_repo}
50+
GOPATH=$(go env GOPATH) .ci/install-yq.sh
51+
- name: Building
52+
run: |
53+
runtime_repo=$(go env GOPATH)/src/github.com/kata-containers/runtime
54+
pushd ${runtime_repo}
55+
GOPATH=$(go env GOPATH) make
56+
- name: Installing
57+
run: |
58+
runtime_repo=$(go env GOPATH)/src/github.com/kata-containers/runtime
59+
pushd ${runtime_repo}
60+
GOPATH=$(go env GOPATH) sudo -E PATH=$PATH make install

.travis.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)