Skip to content

Commit

Permalink
add coverage support
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstarling committed Feb 5, 2024
1 parent 2d48c57 commit 56f982c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/on-push-branch-turbo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,28 @@ jobs:
uses: SimenB/github-actions-cpu-cores@v1
- name: Test ${{ matrix.package }}
run: yarn turbo test --filter="${{ matrix.package }}" --cache-dir=.turbo --only --no-deps -- --coverage --maxWorkers=${{ steps.cpu-cores.outputs.count }} --ci
- name: move coverage
shell: bash
run: mv coverage/coverage-final.json coverage/${{matrix.package}}.json
- uses: actions/upload-artifact@v3
with:
name: coverage-artifacts
path: coverage/
report-coverage:
runs-on: ubuntu-latest
needs: [test-turbo]
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: coverage-artifacts
path: coverage
- name: Merge Code Coverage
run: npx nyc merge coverage/ merged-output/merged-coverage.json
- uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
directory: merged-output
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 56f982c

Please sign in to comment.