Skip to content

Commit

Permalink
build: log process.exit code from jest test
Browse files Browse the repository at this point in the history
  • Loading branch information
modesty committed Apr 29, 2024
1 parent c48a3d0 commit 5df02f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
uses: actions/github-script@v6
with:
script: |
core.setFailed('Tests failed. Please fix errors before merging.');
console.log('Exit code:', core.getInput('result'));
if (core.getInput('result') !== '0') {
core.setFailed('Tests failed. Please fix errors before merging.');
}
result: ${{ jobs.build.outputs.test-result }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion jest.config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"testMatch": ["**/test/_test_.*"],
"testEnvironment": "node"
"testEnvironment": "node",
"bail": false,
"testFailureExitCode": 1
}

0 comments on commit 5df02f0

Please sign in to comment.