From adffaca7795382564e3edc7af2b5b213d6417a9c Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Sat, 21 Dec 2024 20:17:01 -0700 Subject: [PATCH] Add skip inital onedir failures like tools did --- .github/workflows/test-action.yml | 162 +++++++++--------------------- 1 file changed, 47 insertions(+), 115 deletions(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index d809e954b00..dfa03008bee 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -126,7 +126,42 @@ jobs: - name: "Create container ${{ matrix.container }}" run: | - /usr/bin/docker create --name ${{ github.run_id }}_salt-test --network ip6net --workdir /__w/salt/salt --privileged -e "HOME=/github/home" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work":"/__w" -v "/home/runner/work/_temp":"/__w/_temp" -v "/home/runner/work/_actions":"/__w/_actions" -v "/opt/hostedtoolcache":"/__t" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" --entrypoint "/usr/lib/systemd/systemd" ${{ matrix.container }} --systemd --unit rescue.target + /usr/bin/docker \ + create --name ${{ github.run_id }}_salt-test \ + --network ip6net \ + --workdir /__w/salt/salt \ + --privileged \ + -e "HOME=/github/home" \ + -e GITHUB_ACTIONS=true \ + -e CI=true \ + -e SKIP_REQUIREMENTS_INSTALL=1 \ + -e PRINT_TEST_SELECTION=0 \ + -e PRINT_TEST_PLAN_ONLY=0 \ + -e PRINT_SYSTEM_INFO=0 \ + -e RERUN_FAILURES=1 \ + -e GITHUB_ACTIONS_PIPELINE=1 \ + -e SKIP_INITIAL_ONEDIR_FAILURES= 1\ + -e SKIP_INITIAL_GH_ACTIONS_FAILURES=1 \ + -e SKIP_CODE_COVERAGE=${{ inputs.skip-code-coverage && '1' || '0' }} \ + -e CONVERAGE_CONTEXT=${{ matrix.slug }} \ + -e COLUMNS=190 \ + -e PIP_INDEX_URL=${{ vars.PIP_INDEX_URL }} \ + -e PIP_TRUSTED_HOST=${{ vars.PIP_TRUSTED_HOST }} \ + -e PIP_EXTRA_INDEX_URL=${{ vars.PIP_EXTRA_INDEX_URL }} \ + -e PIP_DISABLE_PIP_VERSION_CHECK="1" \ + -e RAISE_DEPRECATIONS_RUNTIME_ERRORS="1" \ + -e SALT_TRANSPORT=${{ matrix.transport }} \ + -e LANG="en_US.UTF-8" \ + -v "/var/run/docker.sock":"/var/run/docker.sock" \ + -v "/home/runner/work":"/__w" \ + -v "/home/runner/work/_temp":"/__w/_temp" \ + -v "/home/runner/work/_actions":"/__w/_actions" \ + -v "/opt/hostedtoolcache":"/__t" \ + -v "/home/runner/work/_temp/_github_home":"/github/home" \ + -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" \ + --entrypoint "/usr/lib/systemd/systemd" \ + ${{ matrix.container }} \ + --systemd --unit rescue.target - name: "Start container ${{ matrix.container }}" run: | @@ -176,150 +211,47 @@ jobs: id: run-fast-changed-tests if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }} run: | - docker exec \ - -e SKIP_REQUIREMENTS_INSTALL=1 \ - -e PRINT_TEST_SELECTION=0 \ - -e PRINT_TEST_PLAN_ONLY=0 \ - -e PRINT_SYSTEM_INFO=0 \ - -e RERUN_FAILURES=1 \ - -e GITHUB_ACTIONS_PIPELINE=1 \ - -e SKIP_INITIAL_GH_ACTIONS_FAILURES=1 \ - -e SKIP_CODE_COVERAGE=${{ inputs.skip-code-coverage && '1' || '0' }} \ - -e CONVERAGE_CONTEXT=${{ matrix.slug }} \ - -e COLUMNS=190 \ - -e PIP_INDEX_URL=${{ vars.PIP_INDEX_URL }} \ - -e PIP_TRUSTED_HOST=${{ vars.PIP_TRUSTED_HOST }} \ - -e PIP_EXTRA_INDEX_URL=${{ vars.PIP_EXTRA_INDEX_URL }} \ - -e PIP_DISABLE_PIP_VERSION_CHECK="1" \ - -e RAISE_DEPRECATIONS_RUNTIME_ERRORS="1" \ - -e SALT_TRANSPORT=${{ matrix.transport }} \ - -e LANG="en_US.UTF-8" \ - ${{ github.run_id}}_salt-test python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + docker exec ${{ github.run_id}}_salt-test python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ --core-tests --slow-tests --suppress-no-test-exit-code --from-filenames=testrun-changed-files.txt - name: Run Fast Tests id: run-fast-tests if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['fast'] }} run: | - docker exec \ - -e SKIP_REQUIREMENTS_INSTALL=1 \ - -e PRINT_TEST_SELECTION=0 \ - -e PRINT_TEST_PLAN_ONLY=0 \ - -e PRINT_SYSTEM_INFO=0 \ - -e RERUN_FAILURES=1 \ - -e GITHUB_ACTIONS_PIPELINE=1 \ - -e SKIP_INITIAL_GH_ACTIONS_FAILURES=1 \ - -e SKIP_CODE_COVERAGE=${{ inputs.skip-code-coverage && '1' || '0' }} \ - -e CONVERAGE_CONTEXT=${{ matrix.slug }} \ - -e COLUMNS=190 \ - -e PIP_INDEX_URL=${{ vars.PIP_INDEX_URL }} \ - -e PIP_TRUSTED_HOST=${{ vars.PIP_TRUSTED_HOST }} \ - -e PIP_EXTRA_INDEX_URL=${{ vars.PIP_EXTRA_INDEX_URL }} \ - -e PIP_DISABLE_PIP_VERSION_CHECK="1" \ - -e RAISE_DEPRECATIONS_RUNTIME_ERRORS="1" \ - -e SALT_TRANSPORT=${{ matrix.transport }} \ - -e LANG="en_US.UTF-8" \ - ${{ github.run_id}}_salt-test python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + docker exec ${{ github.run_id}}_salt-test \ + python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ --suppress-no-test-exit-code - name: Run Slow Tests id: run-slow-tests if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] }} run: | - docker exec \ - -e SKIP_REQUIREMENTS_INSTALL=1 \ - -e PRINT_TEST_SELECTION=0 \ - -e PRINT_TEST_PLAN_ONLY=0 \ - -e PRINT_SYSTEM_INFO=0 \ - -e RERUN_FAILURES=1 \ - -e GITHUB_ACTIONS_PIPELINE=1 \ - -e SKIP_INITIAL_GH_ACTIONS_FAILURES=1 \ - -e SKIP_CODE_COVERAGE=${{ inputs.skip-code-coverage && '1' || '0' }} \ - -e CONVERAGE_CONTEXT=${{ matrix.slug }} \ - -e COLUMNS=190 \ - -e PIP_INDEX_URL=${{ vars.PIP_INDEX_URL }} \ - -e PIP_TRUSTED_HOST=${{ vars.PIP_TRUSTED_HOST }} \ - -e PIP_EXTRA_INDEX_URL=${{ vars.PIP_EXTRA_INDEX_URL }} \ - -e PIP_DISABLE_PIP_VERSION_CHECK="1" \ - -e RAISE_DEPRECATIONS_RUNTIME_ERRORS="1" \ - -e SALT_TRANSPORT=${{ matrix.transport }} \ - -e LANG="en_US.UTF-8" \ - ${{ github.run_id}}_salt-test python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + docker exec ${{ github.run_id}}_salt-test \ + python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ --suppress-no-test-exit-code --no-fast-tests --slow-tests - name: Run Core Tests id: run-core-tests if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['core'] }} run: | - docker exec \ - -e SKIP_REQUIREMENTS_INSTALL=1 \ - -e PRINT_TEST_SELECTION=0 \ - -e PRINT_TEST_PLAN_ONLY=0 \ - -e PRINT_SYSTEM_INFO=0 \ - -e RERUN_FAILURES=1 \ - -e GITHUB_ACTIONS_PIPELINE=1 \ - -e SKIP_INITIAL_GH_ACTIONS_FAILURES=1 \ - -e SKIP_CODE_COVERAGE=${{ inputs.skip-code-coverage && '1' || '0' }} \ - -e CONVERAGE_CONTEXT=${{ matrix.slug }} \ - -e COLUMNS=190 \ - -e PIP_INDEX_URL=${{ vars.PIP_INDEX_URL }} \ - -e PIP_TRUSTED_HOST=${{ vars.PIP_TRUSTED_HOST }} \ - -e PIP_EXTRA_INDEX_URL=${{ vars.PIP_EXTRA_INDEX_URL }} \ - -e PIP_DISABLE_PIP_VERSION_CHECK="1" \ - -e RAISE_DEPRECATIONS_RUNTIME_ERRORS="1" \ - -e SALT_TRANSPORT=${{ matrix.transport }} \ - -e LANG="en_US.UTF-8" \ - ${{ github.run_id}}_salt-test python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + docker exec ${{ github.run_id}}_salt-test \ + python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ --suppress-no-test-exit-code --no-fast-tests --core-tests - name: Run Flaky Tests id: run-flaky-tests if: ${{ fromJSON(inputs.testrun)['selected_tests']['flaky'] }} run: | - docker exec \ - -e SKIP_REQUIREMENTS_INSTALL=1 \ - -e PRINT_TEST_SELECTION=0 \ - -e PRINT_TEST_PLAN_ONLY=0 \ - -e PRINT_SYSTEM_INFO=0 \ - -e RERUN_FAILURES=1 \ - -e GITHUB_ACTIONS_PIPELINE=1 \ - -e SKIP_INITIAL_GH_ACTIONS_FAILURES=1 \ - -e SKIP_CODE_COVERAGE=${{ inputs.skip-code-coverage && '1' || '0' }} \ - -e CONVERAGE_CONTEXT=${{ matrix.slug }} \ - -e COLUMNS=190 \ - -e PIP_INDEX_URL=${{ vars.PIP_INDEX_URL }} \ - -e PIP_TRUSTED_HOST=${{ vars.PIP_TRUSTED_HOST }} \ - -e PIP_EXTRA_INDEX_URL=${{ vars.PIP_EXTRA_INDEX_URL }} \ - -e PIP_DISABLE_PIP_VERSION_CHECK="1" \ - -e RAISE_DEPRECATIONS_RUNTIME_ERRORS="1" \ - -e SALT_TRANSPORT=${{ matrix.transport }} \ - -e LANG="en_US.UTF-8" \ - ${{ github.run_id}}_salt-test python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + docker exec ${{ github.run_id}}_salt-test \ + python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ --suppress-no-test-exit-code --no-fast-tests --flaky-jail - name: Run Full Tests id: run-full-tests if: ${{ fromJSON(inputs.testrun)['type'] == 'full' }} run: | - docker exec \ - -e SKIP_REQUIREMENTS_INSTALL=1 \ - -e PRINT_TEST_SELECTION=0 \ - -e PRINT_TEST_PLAN_ONLY=0 \ - -e PRINT_SYSTEM_INFO=0 \ - -e RERUN_FAILURES=1 \ - -e GITHUB_ACTIONS_PIPELINE=1 \ - -e SKIP_INITIAL_GH_ACTIONS_FAILURES=1 \ - -e SKIP_CODE_COVERAGE=${{ inputs.skip-code-coverage && '1' || '0' }} \ - -e CONVERAGE_CONTEXT=${{ matrix.slug }} \ - -e COLUMNS=190 \ - -e PIP_INDEX_URL=${{ vars.PIP_INDEX_URL }} \ - -e PIP_TRUSTED_HOST=${{ vars.PIP_TRUSTED_HOST }} \ - -e PIP_EXTRA_INDEX_URL=${{ vars.PIP_EXTRA_INDEX_URL }} \ - -e PIP_DISABLE_PIP_VERSION_CHECK="1" \ - -e RAISE_DEPRECATIONS_RUNTIME_ERRORS="1" \ - -e SALT_TRANSPORT=${{ matrix.transport }} \ - -e LANG="en_US.UTF-8" \ - ${{ github.run_id}}_salt-test python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ + docker exec ${{ github.run_id}}_salt-test \ + python3 -m nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \ --slow-tests --core-tests --test-group-count=${{ matrix.test-group-count || 1 }} --test-group=${{ matrix.test-group || 1 }} - name: Fix file ownership