containerd/.github/workflows/ci.yml
Sebastiaan van Stijn bfba0f2840
Bump Golang 1.13.14
full diff: https://github.com/golang/go/compare/go1.13.12...go1.13.14

- go1.13.14 (released 2020/07/16) includes fixes to the compiler, vet, and the
  database/sql, net/http, and reflect packages. See the Go 1.13.14 milestone on
  the issue tracker for details:
  https://github.com/golang/go/issues?q=milestone%3AGo1.13.14+label%3ACherryPickApproved
- go1.13.13 (released 2020/07/14) includes security fixes to the crypto/x509 and
  net/http packages. See the Go 1.13.13 milestone on our issue tracker for details:
  https://github.com/golang/go/issues?q=milestone%3AGo1.13.13+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-05 13:29:16 +02:00

178 lines
5.0 KiB
YAML

name: CI
on: [push, pull_request]
jobs:
#
# Project checks
#
project:
name: Project Checks (DCO, Headers, Vendor)
runs-on: ubuntu-18.04
timeout-minutes: 5
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: '1.13.14'
- 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: 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/kunalkushwaha/ltag
go get -u github.com/LK4D4/vndr
#
# DCO / File headers / Vendor directory validation
#
- name: DCO
env:
GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }}
DCO_VERBOSITY: "-v"
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: Headers
working-directory: src/github.com/containerd/cri
run: |
ltag -t "../project/script/validate/template" --check -v
- name: Vendor
working-directory: src/github.com/containerd/cri
run: ../project/script/validate/vendor
#
# build, unit, integration, and CRI tests
#
linux-build-and-test:
name: Build, Unit, Integration, and CRI (linux amd64)
runs-on: ubuntu-18.04
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: '1.13.14'
- 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 update
sudo apt-get install -y \
btrfs-tools \
libseccomp2 \
libseccomp-dev
make install.deps
working-directory: ${{github.workspace}}/src/github.com/containerd/cri
- name: Install containerd
run: |
make containerd
sudo PATH=$PATH GOPATH=$GOPATH make install-containerd
working-directory: ${{github.workspace}}/src/github.com/containerd/cri
- name: Unit Test
run: |
make test
working-directory: ${{github.workspace}}/src/github.com/containerd/cri
- name: Integration Test
run: |
make test-integration
working-directory: ${{github.workspace}}/src/github.com/containerd/cri
- name: Upload Integration Log File
uses: actions/upload-artifact@v1
with:
name: integration-test-${{github.sha}}.log
path: /tmp/test-integration/containerd.log
- name: CRI Test
run: |
make test-cri
working-directory: ${{github.workspace}}/src/github.com/containerd/cri
- name: Upload CRI Test log file
uses: actions/upload-artifact@v1
with:
name: cri-test-${{github.sha}}.log
path: /tmp/test-cri/containerd.log
test-windows:
name: Build and CRI Test (Windows amd64)
runs-on: windows-2016
steps:
- name: Set up Go 1.13.14
uses: actions/setup-go@v1
with:
go-version: 1.13.14
- name: Checkout cri repo
uses: actions/checkout@v2
with:
path: ${{github.workspace}}\\src\\github.com\\containerd\\cri
- name: Clone containerd repo
run: |
bash.exe -c "GO111MODULE=off go get github.com/containerd/containerd"
- name: Configure Windows environment variables
run: |
echo "::set-env name=GOPATH::$env:GITHUB_WORKSPACE"
- name: Build
run: |
bash.exe -c "pwd && ./test/windows/test.sh"
working-directory: ${{github.workspace}}\\src\\github.com\\containerd\\cri
- name: Upload containerd log file
uses: actions/upload-artifact@v1
with:
name: cadvisor-${{github.sha}}.log
path: c:\\_artifacts\\containerd.log