-
-
Notifications
You must be signed in to change notification settings - Fork 24
54 lines (43 loc) · 1.37 KB
/
ci.yml
File metadata and controls
54 lines (43 loc) · 1.37 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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci --no-audit --no-fund
- name: Lint
run: npm run lint
- name: Typecheck
run: npm run typecheck
- name: Test with coverage (Vitest)
run: npm run test:coverage
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage/lcov.info
flag-name: unit-tests
parallel: false
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-html
path: coverage
retention-days: 7
- name: Purge Coveralls badge cache
if: always()
run: |
curl -X PURGE 'https://camo.githubusercontent.com/184fcdf698a1ae4778058392157f860a0ef80b033b2b128f5f6f7142c34a6399/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f61746f6d696331342f7765622d73657269616c2d706c6f747465722f62616467652e7376673f6272616e63683d6d61696e'