Enable test coverage reporting in CI workflow #40
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: JS Quality Assurance | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '**/workflows/*js*' | |
| - '**.ts' | |
| - '**.json' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| if: '!github.event.pull_request.draft' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| cache: 'yarn' | |
| node-version: '20' | |
| - name: Install | |
| run: yarn install | |
| - name: Lint Source Code | |
| run: yarn lint | |
| - name: Lint Tests | |
| run: yarn lint:test | |
| - name: Execute Tests | |
| run: yarn test --coverage | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |