Merge pull request #133 from hey-api/chore/split-test-snapshot-into-s… #14
This file contains 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: | |
jobs: | |
upload: | |
name: Upload | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install | |
- name: Build library | |
run: npm run build | |
- name: Run test coverage | |
run: npm run test:coverage | |
- name: Upload code coverage to codecov.io | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: ./coverage | |
flags: unittests | |
fail_ci_if_error: true |