Skip to content

Commit

Permalink
fix: test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fforbeck committed Nov 6, 2024
1 parent f8b420d commit a530455
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,20 @@ runs:
shell: bash
- run: npm run lint
shell: bash
- run: |
npm run test:unit
if [ $? -ne 0 ]; then
echo "Unit Tests failed"
exit 1
fi
- run: npm run test:unit
name: Unit Tests
shell: bash
- run: |
npm run test:integration
if [ $? -ne 0 ]; then
echo "Integration Tests failed"
exit 1
fi
- run: npm run test:integration
name: Integration Tests
shell: bash
- run: |
npm run test:miniflare
if [ $? -ne 0 ]; then
echo "Miniflare Tests failed"
# If the Miniflare tests fail we need to capture the output and check for the error,
# because the error is not bubbled up from miniflare and the tests will pass.
npm run test:miniflare | tee test-output.log
# Check for the error in the output to fail the test action
if grep -q 'ERR_TEST_FAILURE' test-output.log; then
echo "Test failure detected: ERR_TEST_FAILURE"
exit 1
fi
name: Miniflare Tests
Expand Down

0 comments on commit a530455

Please sign in to comment.