Skip to content

Commit

Permalink
feat(actions): added coverage.yml (#10)
Browse files Browse the repository at this point in the history
Co-authored-by: Aman Jain <aman.j@safe.security>
  • Loading branch information
jn-aman and jainaman1497 committed Dec 4, 2021
1 parent 1784453 commit d372cbd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'coverage'
on:
pull_request:
branches:
- master
- main
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Tests on ${{ matrix.node-version }}
uses: artiomtr/jest-coverage-report-action@v2.0-rc.5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
package-manager: yarn
test-script: yarn run test:coverage:jest
env:
CI: true
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"scripts": {
"build": "tsc",
"test": "jest",
"prepare": "husky install"
"prepare": "husky install",
"test:coverage:jest": "jest --silent --ci --json --coverage --testLocationInResults --outputFile=\"report.json\" --forceExit"
}
}

0 comments on commit d372cbd

Please sign in to comment.