Skip to content

Commit

Permalink
add checks to fail combined-coverage tests after each part (#346)
Browse files Browse the repository at this point in the history
Currently tests are failing silently in Github actions. This PR adds checks to combined-coverage.sh script to exit if a test fails. The three tests currently failing on main will now be caught, I created this item to handle them separately, as it will require a change to make react versions to test programmable in reusable workflows

J=SLAP-2459
TEST=manual

ran actions with an intentional failure (log). Also commented out npm publish from the slap publish command and tested that it makes it passed the check there
  • Loading branch information
tatimblin committed Dec 12, 2022
1 parent 2ce727e commit cc65e8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"wcag": "test-storybook",
"test:unit": "jest --coverage --coverageDirectory=coverage/unit",
"test:unit": "jest",
"test:visual": "./tests/scripts/visual-coverage.sh",
"test": "./tests/scripts/combined-coverage.sh"
},
Expand Down Expand Up @@ -100,11 +100,12 @@
"jest": {
"bail": 0,
"verbose": true,
"collectCoverage": false,
"collectCoverage": true,
"collectCoverageFrom": [
"src/**",
"!src/models/**"
],
"coverageDirectory": "coverage/unit",
"moduleFileExtensions": [
"js",
"ts",
Expand Down
4 changes: 2 additions & 2 deletions tests/scripts/combined-coverage.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

npm run test:unit
npm run test:visual
npm run test:unit || exit 1
npm run test:visual || exit 1

# merge
mkdir -p coverage/merge
Expand Down

0 comments on commit cc65e8b

Please sign in to comment.