Refresh the code graph #65
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Code coverage | |
| # Runs the test suite with coverage and uploads the Cobertura report to GitHub's | |
| # code-quality analysis, which surfaces coverage on pull requests. See: | |
| # https://docs.github.com/code-security/how-tos/maintain-quality-code/set-up-code-coverage | |
| on: | |
| push: | |
| branches: ['main'] | |
| pull_request: | |
| branches: ['main'] | |
| permissions: | |
| contents: read | |
| code-quality: write | |
| concurrency: | |
| group: coverage-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run test:coverage | |
| # Only upload from same-repo events (forked-PR runs cannot write coverage). | |
| - name: Upload coverage report | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | |
| uses: actions/upload-code-coverage@v1 | |
| with: | |
| file: coverage/cobertura-coverage.xml | |
| language: TypeScript | |
| label: code-coverage/vitest |