Skip to content

Commit

Permalink
ci: compute code coverage in the CI (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
p9f committed Oct 10, 2023
1 parent 10083cb commit cf85f2e
Show file tree
Hide file tree
Showing 4 changed files with 401 additions and 293 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Codecov

on:
push:
branches: [main]
pull_request:

jobs:
codecov:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1

- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run test -- --coverage

- name: Upload coverage to github actions artifacts
uses: actions/upload-artifact@v3
with:
name: code-coverage
path: coverage/

- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
comment: false
Loading

0 comments on commit cf85f2e

Please sign in to comment.