Skip to content

Commit

Permalink
test: use codecov/codecov-action (#1169)
Browse files Browse the repository at this point in the history
Co-authored-by: afc163 <afc163@gmail.com>
  • Loading branch information
Layouwen and afc163 authored Aug 13, 2024
1 parent 4459af8 commit 3613356
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]
on: ['push', 'pull_request']

jobs:
setup:
Expand Down Expand Up @@ -32,6 +28,7 @@ jobs:
mkdir package-temp-dir
fi
cp package-lock.json package-temp-dir
- name: cache node_modules
id: node_modules_cache_id
uses: actions/cache@v4
Expand Down Expand Up @@ -131,6 +128,11 @@ jobs:
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: coverage
run: npm run coverage && bash <(curl -s https://codecov.io/bash)
run: npm test -- --coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

needs: setup

0 comments on commit 3613356

Please sign in to comment.