Add codecov to unit tests

This commit is contained in:
Sidharth Vinod 2023-06-17 17:40:06 +05:30
parent 1e84668270
commit 8d244062e2
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD

View File

@ -31,7 +31,7 @@ jobs:
- name: Run Unit Tests - name: Run Unit Tests
run: | run: |
pnpm run ci --coverage pnpm test:coverage
- name: Run ganttDb tests using California timezone - name: Run ganttDb tests using California timezone
env: env:
@ -39,8 +39,15 @@ jobs:
# since some days have 25 hours instead of 24. # since some days have 25 hours instead of 24.
TZ: America/Los_Angeles TZ: America/Los_Angeles
run: | run: |
pnpm exec vitest run ./packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts pnpm exec vitest run ./packages/mermaid/src/diagrams/gantt/ganttDb.spec.ts --coverage
- uses: codecov/codecov-action@v3
with:
files: ./coverage/vitest/lcov.info
flags: unit
name: mermaid-codecov
fail_ci_if_error: true
verbose: true
# Coveralls is throwing 500. Disabled for now. # Coveralls is throwing 500. Disabled for now.
# - name: Upload Coverage to Coveralls # - name: Upload Coverage to Coveralls
# uses: coverallsapp/github-action@v2 # uses: coverallsapp/github-action@v2