Enhance test matrix

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
v0.9
CrazyMax 2021-07-14 17:06:15 +02:00
parent 64dd6d5520
commit 67c1cb09ed
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
1 changed files with 23 additions and 23 deletions

View File

@ -83,29 +83,26 @@ jobs:
strategy:
fail-fast: false
matrix:
pkg:
- ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend
- ./frontend/dockerfile
worker:
- containerd
- containerd-1.4
- containerd-snapshotter-stargz
- oci
- oci-rootless
- oci-snapshotter-stargz
typ:
- integration
- dockerfile
exclude:
- pkg: ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend
typ: dockerfile
include:
-
pkg: ./client
typ: integration
-
pkg: ./cmd/buildctl ./worker/containerd
typ: integration
-
pkg: ./solver
typ: integration
-
pkg: ''
- pkg: ./...
skip-integration-tests: 1
typ: integration gateway
-
pkg: ./frontend
typ: ''
-
pkg: ./frontend/dockerfile
typ: ''
-
pkg: ./frontend/dockerfile
typ: dockerfile
steps:
-
name: Checkout
@ -135,14 +132,17 @@ jobs:
with:
driver-opts: image=${{ env.REPO_SLUG_ORIGIN }}
-
name: Test ${{ matrix.pkg }} ${{ matrix.typ }}
name: Test pkg=${{ matrix.pkg }} ; typ=${{ matrix.typ }} ; skipit=${{ matrix.skip-integration-tests }} ; worker=${{ matrix.worker }}
run: |
export TESTFLAGS="-v --parallel=6 --timeout=20m"
if [ -n "${{ matrix.worker }}" ]; then
export TESTFLAGS="${TESTFLAGS} --run=//worker=${{ matrix.worker }}$"
fi
./hack/test ${{ matrix.typ }}
mv ./coverage/coverage.txt ./coverage/coverage-${{ github.job }}-$(echo "${{ matrix.coverage-pkg }}-${{ matrix.skip-integration-tests }}-${{ matrix.typ }}" | tr -dc '[:alnum:]-\n\r' | tr '[:upper:]' '[:lower:]').txt
mv ./coverage/coverage.txt ./coverage/coverage-${{ github.job }}-$(echo "${{ matrix.pkg }}-${{ matrix.skip-integration-tests }}-${{ matrix.typ }}-${{ matrix.worker }}" | tr -dc '[:alnum:]-\n\r' | tr '[:upper:]' '[:lower:]').txt
env:
TEST_COVERAGE: 1
TESTPKGS: ${{ matrix.pkg }}
TESTFLAGS: -v --parallel=6 --timeout=20m
SKIP_INTEGRATION_TESTS: ${{ matrix.skip-integration-tests }}
CACHEDIR_FROM: /tmp/.buildkit-cache/${{ env.CACHEKEY_INTEGRATION_TESTS }} /tmp/.buildkit-cache/${{ env.CACHEKEY_BINARIES }}
-