Skip to content

Commit

Permalink
feat: add coverage command for ci unit tests (#332)
Browse files Browse the repository at this point in the history
* feat: add coverage command for ci unit tests

* feat: update autogenerated msw script

* fix: load .env file for unit tests too

* feat(ci): try using istanbul instead for coverage

v8 doesn't seem to pipe to dd

* fix: use dotenv for coverage command too

* fix: use -- to correctly pass coverage flag to vitest
  • Loading branch information
karrui authored Oct 9, 2024
1 parent a09f1b5 commit f9f331a
Show file tree
Hide file tree
Showing 5 changed files with 1,720 additions and 849 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
service: ${{ secrets.DD_SERVICE_NAME }}
api_key: ${{ secrets.DD_API_KEY }}
- name: Test
run: npm run test:vitest
run: npm run test-ci:coverage
env:
# Required to allow Datadog to trace Vitest tests
NODE_OPTIONS: ${{ secrets.DD_API_KEY && secrets.DD_SERVICE_NAME && format('-r {0} --import {1}', env.DD_TRACE_PACKAGE, env.DD_TRACE_ESM_IMPORT) || '' }}
Expand Down
Loading

0 comments on commit f9f331a

Please sign in to comment.