diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 95c9a873..707f8e19 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -104,11 +104,17 @@ 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' }); + includes.push({ os: os, test: test, test_name: 'root0', docker_install_type: 'image', docker_install_version: '27.3.1' }); + includes.push({ os: os, test: test, test_name: 'root0', docker_install_type: 'image', docker_install_version: 'master' }); + includes.push({ os: os, test: test, test_name: 'root0', docker_install_type: 'image', docker_install_version: 'latest' }); + includes.push({ os: os, test: test, test_name: 'root0', docker_install_type: 'archive', docker_install_version: 'v26.1.4' }); + includes.push({ os: os, test: test, test_name: 'root0', docker_install_type: 'archive', docker_install_version: 'latest' }); + if (os !== 'ubuntu-latest') { + includes.push({ os: os, test: test, test_name: 'rootless', docker_install_type: 'image', docker_install_version: 'latest' }); + includes.push({ os: os, test: test, test_name: 'rootless', docker_install_type: 'archive', docker_install_version: 'latest' }); + } + includes.push({ os: os, test: test, test_name: 'tcp', docker_install_type: 'image', docker_install_version: 'latest' }); + includes.push({ os: os, test: test, test_name: 'tcp', docker_install_type: 'archive', docker_install_version: 'latest' }); } else { includes.push({ os: os, test: test }); } @@ -177,13 +183,19 @@ jobs: - name: Test run: | - yarn test:itg-coverage --runTestsByPath __tests__/${{ matrix.test }} --coverageDirectory=./coverage + testNamePattern=.* + if [ -n "${{ matrix.test_name }}" ]; then + testNamePattern=${{ matrix.test_name }} + fi + set -x + yarn test:itg-coverage "--testNamePattern=${testNamePattern} " --runTestsByPath="__tests__/${{ matrix.test }}" --coverageDirectory=./coverage env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CTN_BUILDER_NAME: ${{ steps.builder.outputs.name }} TEST_FOR_SUMMARY: ${{ secrets.TEST_FOR_SUMMARY }} DOCKER_INSTALL_TYPE: ${{ matrix.docker_install_type }} DOCKER_INSTALL_VERSION: ${{ matrix.docker_install_version }} + shell: bash - name: Check coverage run: | diff --git a/__tests__/docker/install.test.itg.ts b/__tests__/docker/install.test.itg.ts index 6f651a70..b4c8d07b 100644 --- a/__tests__/docker/install.test.itg.ts +++ b/__tests__/docker/install.test.itg.ts @@ -25,7 +25,7 @@ import {Exec} from '../../src/exec'; const tmpDir = () => fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'docker-install-itg-')); -describe('root', () => { +describe('root0', () => { // prettier-ignore test.each(getSources(true))( 'install docker %s', async (source) => {