From 67c1cb09eda887d8ad1455658c4e0b04a1f4615b Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Wed, 14 Jul 2021 17:06:15 +0200 Subject: [PATCH] Enhance test matrix Signed-off-by: CrazyMax --- .github/workflows/build.yml | 46 ++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index faaeadba..b1055357 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }} -