split tests and some refactoring

Signed-off-by: Mike Brown <brownwm@us.ibm.com>
This commit is contained in:
Mike Brown 2020-04-17 15:21:53 -05:00
parent c6c9268eb0
commit b838ac8c2e

View File

@ -3,11 +3,13 @@ on: [push, pull_request]
jobs: jobs:
# #
# validate, unit, integration, and CRI tests # Project checks
# #
test-linux: project:
name: linux validate build and unit integration and CRI name: Project Checks (DCO, Vendor)
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
timeout-minutes: 5
steps: steps:
- name: Install Go - name: Install Go
uses: actions/setup-go@v1 uses: actions/setup-go@v1
@ -26,18 +28,6 @@ jobs:
path: ${{github.workspace}}/src/github.com/containerd/cri path: ${{github.workspace}}/src/github.com/containerd/cri
fetch-depth: 150 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 - name: Checkout project repo
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@ -71,34 +61,84 @@ jobs:
DCO_RANGE=$(curl ${GITHUB_COMMIT_URL} | jq -r '.[0].parents[0].sha +".."+ .[-1].sha') DCO_RANGE=$(curl ${GITHUB_COMMIT_URL} | jq -r '.[0].parents[0].sha +".."+ .[-1].sha')
fi fi
../project/script/validate/dco ../project/script/validate/dco
- name: Vendor - name: Vendor
run: ../project/script/validate/vendor run: ../project/script/validate/vendor
working-directory: src/github.com/containerd/cri working-directory: src/github.com/containerd/cri
- name: Build and Test #
# 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.10'
- name: Set env
shell: bash
run: | 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
make install.deps make install.deps
working-directory: ${{github.workspace}}/src/github.com/containerd/cri
- name: Install containerd
run: |
make containerd make containerd
sudo PATH=$PATH GOPATH=$GOPATH make install-containerd sudo PATH=$PATH GOPATH=$GOPATH make install-containerd
working-directory: ${{github.workspace}}/src/github.com/containerd/cri
- name: Unit Test
run: |
make test make test
working-directory: ${{github.workspace}}/src/github.com/containerd/cri
- name: Integration Test
run: |
make test-integration 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.log
path: /tmp/test-integration/containerd.log
- name: CRI Test
run: |
make test-cri make test-cri
working-directory: ${{github.workspace}}/src/github.com/containerd/cri working-directory: ${{github.workspace}}/src/github.com/containerd/cri
- name: Upload containerd log file - name: Upload CRI Test log file
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: integration.log name: cri-test.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 path: /tmp/test-cri/containerd.log
test-windows: test-windows:
name: Build and CRI Test Windows amd64 name: Build and CRI Test (Windows amd64)
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Set up Go 1.13.10 - name: Set up Go 1.13.10