Skip to content

Commit

Permalink
Run coverage and tests during the GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
dcadenas committed Dec 21, 2023
1 parent 31c8665 commit d17ce18
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,13 @@ jobs:
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
run: pnpm install

- name: Run tests
run: pnpm test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
file: ./coverage/lcov.info
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"node": ">=16.0.0"
},
"scripts": {
"test": "c8 mocha -j 2 test/*.test.js --timeout=5000",
"test": "c8 --reporter=lcov --check-coverage --lines 80 --functions 80 --branches 80 --statements 80 mocha --timeout=5000 --exit",
"test:integration": "c8 mocha -j 2 test/integration.test.js --timeout=5000",
"test:grep": "c8 mocha -j 2 --timeout=5000 --grep",
"test:rateLimit": "node runArtilleryTest.mjs",
Expand Down

0 comments on commit d17ce18

Please sign in to comment.