Skip to content

Commit

Permalink
Merge pull request #123 from hey-api/feat/codecov
Browse files Browse the repository at this point in the history
feat: codecov
  • Loading branch information
mrlubos committed Mar 24, 2024
2 parents 282ea25 + 79adecd commit 93d2c4c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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

0 comments on commit 93d2c4c

Please sign in to comment.