-
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 884 Bytes
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: 🧪 Generate Coverage Report to Codecov
on:
push:
branches:
- main
- 'feature/**'
- 'bugfix/**'
- 'feat/**'
pull_request:
branches:
- main
jobs:
test:
name: Run tests and collect coverage
runs-on: ubuntu-latest
steps:
# Step 1: Checkout code
- name: 📂 Checkout code
uses: actions/checkout@v4
# Step 2: Set up Node.js and pnpm
- name: 📦 Set up Node.js and pnpm
uses: pnpm/action-setup@v4
with:
run_install: |
- recursive: true
args: [--frozen-lockfile]
- name: ✅ Run tests
run: pnpm run test:ci
- name: 📤 Upload results to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true