Merge pull request #1445 from mikebrow/move-travis-to-github-actions
adds git hub actions for linux CI
This commit is contained in:
commit
45f0e21d2c
99
.github/workflows/ci.yml
vendored
99
.github/workflows/ci.yml
vendored
@ -2,8 +2,103 @@ name: CI
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build-windows:
|
||||
name: Build Windows amd64
|
||||
#
|
||||
# validate, unit, integration, and CRI tests
|
||||
#
|
||||
test-linux:
|
||||
name: linux validate build and unit integration and CRI
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: '1.13.10'
|
||||
|
||||
- name: Set env
|
||||
shell: bash
|
||||
run: |
|
||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
||||
echo "::add-path::${{ github.workspace }}/bin"
|
||||
|
||||
- name: Checkout cri repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ${{github.workspace}}/src/github.com/containerd/cri
|
||||
fetch-depth: 150
|
||||
|
||||
- name: Before install
|
||||
run: |
|
||||
sudo sysctl net.ipv6.conf.all.disable_ipv6=0
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get install -y \
|
||||
btrfs-tools \
|
||||
libseccomp2 \
|
||||
libseccomp-dev \
|
||||
socat
|
||||
|
||||
- name: Checkout project repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: containerd/project
|
||||
path: src/github.com/containerd/project
|
||||
|
||||
#
|
||||
# Go get dependencies
|
||||
#
|
||||
- name: Install go get dependencies
|
||||
env:
|
||||
GO111MODULE: off
|
||||
run: |
|
||||
go get -u github.com/vbatts/git-validation
|
||||
go get -u github.com/LK4D4/vndr
|
||||
|
||||
#
|
||||
# DCO / Vendor directory validation
|
||||
#
|
||||
- name: DCO
|
||||
env:
|
||||
GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }}
|
||||
DCO_VERBOSITY: "-q"
|
||||
DCO_RANGE: ""
|
||||
working-directory: src/github.com/containerd/cri
|
||||
run: |
|
||||
set -x
|
||||
if [ -z "${GITHUB_COMMIT_URL}" ]; then
|
||||
DCO_RANGE=$(jq -r '.after + "..HEAD"' ${GITHUB_EVENT_PATH})
|
||||
else
|
||||
DCO_RANGE=$(curl ${GITHUB_COMMIT_URL} | jq -r '.[0].parents[0].sha +".."+ .[-1].sha')
|
||||
fi
|
||||
../project/script/validate/dco
|
||||
- name: Vendor
|
||||
run: ../project/script/validate/vendor
|
||||
working-directory: src/github.com/containerd/cri
|
||||
|
||||
- name: Build and Test
|
||||
run: |
|
||||
make install.deps
|
||||
make containerd
|
||||
sudo PATH=$PATH GOPATH=$GOPATH make install-containerd
|
||||
make test
|
||||
make test-integration
|
||||
make test-cri
|
||||
working-directory: ${{github.workspace}}/src/github.com/containerd/cri
|
||||
|
||||
- name: Upload containerd log file
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: integration.log
|
||||
path: /tmp/test-integration/containerd.log
|
||||
|
||||
- name: Upload cri log file
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: cri.log
|
||||
path: /tmp/test-cri/containerd.log
|
||||
|
||||
test-windows:
|
||||
name: Build and CRI Test Windows amd64
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Set up Go 1.13.10
|
||||
|
Loading…
Reference in New Issue
Block a user