Skip to content

Commit

Permalink
enable coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
ttwiesal committed Mar 20, 2024
1 parent b0b270f commit 51062c7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/coverage-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'coverage report'
on:
pull_request:
branches:
- main
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ArtiomTr/jest-coverage-report-action@v2
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/node_modules
/node_modules
coverage
16 changes: 15 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"start": "node index.js --runCount=30 --collection=./sample-collections/TSTcloud.postman_collection.json",
"test": "jest",
"test": "jest --coverage --coverageReporters=json",
"test:watch": "jest --watch",
"lint": "eslint . --ext .js"
},
Expand All @@ -33,5 +33,19 @@
"eslint": "^8.50.0",
"jest": "^29.5.5",
"prettier": "^3.0.3"
},
"jest": {
"coverageReporters": [
"json",
"html"
],
"coverageThreshold": {
"global": {
"branches": 80,
"functions": 80,
"lines": 80,
"statements": 80
}
}
}
}

0 comments on commit 51062c7

Please sign in to comment.