From 103d7a917b7086353f9229012991e0ad4b714464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Sch=C3=BCtte?= Date: Tue, 17 Dec 2024 15:40:13 +0100 Subject: [PATCH] Add test for guard --- .github/workflows/test.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d34312f..ecfe264 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: [20] + version: [20, 22] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -28,3 +28,26 @@ jobs: - uses: ./ with: token: ${{ github.token }} + + test_guard: + name: Test Action guard + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + - uses: ./ + env: + GITHUB_ACTION_REPOSITORY: ${{ github.repository }} + GITHUB_TOKEN: ${{ github.token }} + id: run-guard + continue-on-error: true + - if: ${{ (success() || failure()) && steps.run-guard.outcome == 'failure' }} + run: | + echo "Guard failed as expected" + - if: ${{ (success() || failure()) && steps.run-guard.outcome != 'failure' }} + run: | + echo "Guard did not fail as expected" + exit 1