Skip to content

Commit

Permalink
fail the job if tests fail
Browse files Browse the repository at this point in the history
  • Loading branch information
45930 committed Nov 20, 2024
1 parent b90f2b8 commit 7428bc3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,3 @@ jobs:
- name: Run tests
run: |
npm run test
if [ $? -ne 0 ]; then
echo "Tests failed"
exit 1
fi
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build": "npm run clean && npx tsc",
"start": "node build/src/index.js",
"dev": "cross-env NODE_NO_WARNINGS=1 npx nodemon src/index.ts",
"test": "npx tsc && for testfile in $(find build/tests -type f -name '*.test.js'); do node $testfile; done",
"test": "npx tsc && for testfile in $(find build/tests -type f -name '*.test.js'); do node $testfile || exit 1; done",
"clean": "rimraf ./build",
"gen-test-mocks": "cross-env NODE_NO_WARNINGS=1 node --loader ts-node/esm tests/mocked_sql/generate_mock_data.ts",
"benchmark": "cross-env NODE_NO_WARNINGS=1 node --loader ts-node/esm benchmark/setup.ts && npx artillery run benchmark/graphql.yaml --output benchmark/report.json",
Expand Down

0 comments on commit 7428bc3

Please sign in to comment.