-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (45 loc) · 1.14 KB
/
ci.yml
File metadata and controls
55 lines (45 loc) · 1.14 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- name: Install coverage provider
run: npm install --no-save @vitest/coverage-v8@^3.0.0
- name: Run tests
run: npx vitest run --coverage
continue-on-error: true
- name: Coverage summary
if: always()
run: |
if [ -d coverage ]; then
ls coverage/
cat coverage/coverage-summary.json 2>/dev/null || true
fi
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: always()
with:
directory: ./coverage
flags: unittests
name: sdk-node
fail_ci_if_error: false
- uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-sdk-node
path: coverage/
retention-days: 30
if-no-files-found: ignore