Skip to content

Commit 3613356

Browse files
Layouwenafc163
andauthored
test: use codecov/codecov-action (#1169)
Co-authored-by: afc163 <[email protected]>
1 parent 4459af8 commit 3613356

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: CI
22

3-
on:
4-
push:
5-
branches: [master]
6-
pull_request:
7-
branches: [master]
3+
on: ['push', 'pull_request']
84

95
jobs:
106
setup:
@@ -32,6 +28,7 @@ jobs:
3228
mkdir package-temp-dir
3329
fi
3430
cp package-lock.json package-temp-dir
31+
3532
- name: cache node_modules
3633
id: node_modules_cache_id
3734
uses: actions/cache@v4
@@ -131,6 +128,11 @@ jobs:
131128
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
132129

133130
- name: coverage
134-
run: npm run coverage && bash <(curl -s https://codecov.io/bash)
131+
run: npm test -- --coverage
132+
133+
- name: Upload coverage to Codecov
134+
uses: codecov/codecov-action@v4
135+
with:
136+
token: ${{ secrets.CODECOV_TOKEN }}
135137

136138
needs: setup

0 commit comments

Comments
 (0)