From 1786d9bcec4b55fa3bc4675711bdb37c59edadee Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Thu, 12 Dec 2024 11:10:22 +0100 Subject: [PATCH] ci: split docker install by test name Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- .github/workflows/test.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 95c9a873..e476052b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -104,11 +104,13 @@ jobs: for (const os of ['ubuntu-latest', 'macos-13', 'windows-latest']) { for (const test of tests) { if (test === 'docker/install.test.itg.ts') { - includes.push({ os: os, test: test, docker_install_type: 'image', docker_install_version: '27.3.1' }); - includes.push({ os: os, test: test, docker_install_type: 'image', docker_install_version: 'master' }); - includes.push({ os: os, test: test, docker_install_type: 'image', docker_install_version: 'latest' }); - includes.push({ os: os, test: test, docker_install_type: 'archive', docker_install_version: 'v26.1.4' }); - includes.push({ os: os, test: test, docker_install_type: 'archive', docker_install_version: 'latest' }); + for (const testName of ['root', 'rootless', 'tcp']) { + includes.push({ os: os, test: test, test_name: testName, docker_install_type: 'image', docker_install_version: '27.3.1' }); + includes.push({ os: os, test: test, test_name: testName, docker_install_type: 'image', docker_install_version: 'master' }); + includes.push({ os: os, test: test, test_name: testName, docker_install_type: 'image', docker_install_version: 'latest' }); + includes.push({ os: os, test: test, test_name: testName, docker_install_type: 'archive', docker_install_version: 'v26.1.4' }); + includes.push({ os: os, test: test, test_name: testName, docker_install_type: 'archive', docker_install_version: 'latest' }); + } } else { includes.push({ os: os, test: test }); } @@ -177,7 +179,11 @@ jobs: - name: Test run: | - yarn test:itg-coverage --runTestsByPath __tests__/${{ matrix.test }} --coverageDirectory=./coverage + testNamePattern="" + if [ -n "${{ matrix.test_name }}" ]; then + testNamePattern=" --testNamePattern=${{ matrix.test_name }}" + fi + yarn test:itg-coverage --runTestsByPath __tests__/${{ matrix.test }}$testNamePattern --coverageDirectory=./coverage env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CTN_BUILDER_NAME: ${{ steps.builder.outputs.name }}