Increase test coverage #64
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: Tests and coverage | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| tests_and_coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 'lts/*' | |
| - name: Install requirements | |
| run: npm ci | |
| - name: Generate docs (also checks types) | |
| run: npm run-script docs | |
| - name: Run tests and collect coverage | |
| run: npm run-script test:coverage | |
| - name: Upload coverage report artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: ./coverage | |
| - name: Upload coverage reports to Codecov with GitHub Action | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage/lcov.info | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| # flags: report-type="test_results" | |
| flags: unittests | |
| files: ./coverage/junit.xml | |
| disable_search: true | |
| verbose: true |