mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-25 19:21:53 +00:00
github: Add github actions
This PR enables the github actions for this repository. Fixes #193 Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
parent
47959354dd
commit
92a892e741
46
.github/workflows/main.yml
vendored
Normal file
46
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
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: |
|
||||||
|
community_repo=$(go env GOPATH)/src/github.com/kata-containers/community
|
||||||
|
pushd ${community_repo}
|
||||||
|
GOPATH=$(go env GOPATH) .ci/setup.sh
|
||||||
|
- name: Running static checks
|
||||||
|
run: |
|
||||||
|
community_repo=$(go env GOPATH)/src/github.com/kata-containers/community
|
||||||
|
pushd ${community_repo}
|
||||||
|
GOPATH=$(go env GOPATH) .ci/static-checks.sh
|
21
.travis.yml
21
.travis.yml
@ -1,21 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2019 Intel Corporation
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
dist: xenial
|
|
||||||
|
|
||||||
language: go
|
|
||||||
|
|
||||||
go:
|
|
||||||
- master
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- ".ci/setup.sh"
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- ".ci/static-checks.sh"
|
|
||||||
|
|
||||||
script:
|
|
||||||
- ".ci/run.sh"
|
|
Loading…
Reference in New Issue
Block a user