-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (35 loc) · 1.15 KB
/
ci.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
40
41
42
43
name: Codecov
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['v22.11.0']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js (${{ matrix.node-version }})
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Run tests and generate coverage
run: npm run test -- --coverage
- name: Build
run: npm run build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }} # Required if the repo is private
files: ./coverage/lcov.info # Path to the lcov report
flags: unittests # Optional: Flag for specific test type
name: codecov-umbrella # Optional: Custom name for coverage report
fail_ci_if_error: true # Optional: Fail CI if upload fails