Add jest coverage diff reporting action (#3651)

This commit is contained in:
Hetu Nandu 2021-03-20 19:28:10 +05:30 committed by GitHub
parent f5c8eaeb64
commit f1cb2a35b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -93,7 +93,11 @@ jobs:
echo ::set-output name=version::$next_version-SNAPSHOT
- name: Run the jest tests
run: REACT_APP_ENVIRONMENT=${{steps.vars.outputs.REACT_APP_ENVIRONMENT}} yarn run test:unit
uses: anuraag016/Jest-Coverage-Diff@V1.1
with:
fullCoverageDiff: false
runCommand: cd app/client && REACT_APP_ENVIRONMENT=${{steps.vars.outputs.REACT_APP_ENVIRONMENT}} yarn run test:unit
delta: 0.5
# We burn React environment & the Segment analytics key into the build itself.
# This is to ensure that we don't need to configure it in each installation

View File

@ -142,7 +142,7 @@
"eject": "react-scripts eject",
"start-prod": "REACT_APP_ENVIRONMENT=PRODUCTION craco start",
"cytest": "REACT_APP_TESTING=TESTING REACT_APP_ENVIRONMENT=DEVELOPMENT craco start & ./node_modules/.bin/cypress open",
"test:unit": "$(npm bin)/jest -b --colors --no-cache",
"test:unit": "$(npm bin)/jest -b --colors --no-cache --coverage --collectCoverage=true --coverageDirectory='./' --coverageReporters='json-summary'",
"storybook": "start-storybook -p 9009 -s public",
"build-storybook": "build-storybook -s public"
},