Merge pull request #69 from tabkram/feature/trace #363
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: 'Coverage' | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: write | |
| checks: write | |
| contents: write | |
| discussions: write | |
| pages: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run tests with coverage | |
| run: npm test -- --ci --json --coverage --coverageReporters=lcov --outputFile=coverage/report.json | |
| - name: Generate Jest Coverage Report (Without Running Tests Again) | |
| uses: ArtiomTr/jest-coverage-report-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| coverage-file: coverage/report.json # Use JSON format | |
| - name: Upload coverage to Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path-to-lcov: coverage/lcov.info |