From 153ccde9bc89de7fabd26026009f28e4c3f5bae1 Mon Sep 17 00:00:00 2001 From: Brendon Smith Date: Wed, 10 Jul 2024 18:40:53 -0400 Subject: [PATCH] Verify fail-fast in unsupported environments --- .github/workflows/self-smoke-test-action.yml | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/self-smoke-test-action.yml b/.github/workflows/self-smoke-test-action.yml index 0a88c1c..ddddf83 100644 --- a/.github/workflows/self-smoke-test-action.yml +++ b/.github/workflows/self-smoke-test-action.yml @@ -29,6 +29,34 @@ env: PYTEST_THEME_MODE jobs: + fail-fast: + if: >- + github.event_name == 'pull_request' || + github.event.workflow_run.conclusion == 'success' + + strategy: + matrix: + os: [macos-latest, windows-latest] + + runs-on: ${{ matrix.os }} + + timeout-minutes: 2 + + steps: + - name: Check out the action locally + uses: actions/checkout@v3 + with: + path: test + - name: Fail-fast in unsupported environments + continue-on-error: true + id: fail-fast + uses: ./test + - name: Error if action did not fail-fast in unsupported environments + if: steps.fail-fast.outcome == 'success' + run: | + >&2 echo This action should fail-fast in unsupported environments. + exit 1 + smoke-test: if: >- github.event_name == 'pull_request' ||