Skip to content

Commit

Permalink
Add test for guard
Browse files Browse the repository at this point in the history
  • Loading branch information
hanseartic committed Dec 17, 2024
1 parent 72a3e3b commit 821ac74
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,3 +28,23 @@ 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: ./
id: run-guard
#continue-on-error: true
- if: ${{ failure() }}
run: |
echo "Guard failed as expected"
- if: ${{ (success() || failure()) && steps.run-guard.conclusion != 'failure' }}
run: |
echo "Guard did not fail as expected"
exit 1

0 comments on commit 821ac74

Please sign in to comment.