-
-
Notifications
You must be signed in to change notification settings - Fork 69
46 lines (44 loc) · 1.16 KB
/
Copy pathci.yml
File metadata and controls
46 lines (44 loc) · 1.16 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
name: CI
on:
pull_request:
branches: [develop, master]
push:
branches: [develop]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
node-version: [18, 20, 22]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install deps
run: npm ci || npm install --no-audit --no-fund
- name: Lint
run: npm run lint
- name: Format check
run: npm run format:check
- name: Type check
run: npx tsc --noEmit
- name: Test + coverage
run: npm run test:coverage
- name: Upload coverage to Codecov
if: matrix.node-version == 20
uses: codecov/codecov-action@v4
with:
files: ./coverage/lcov.info
flags: unittests
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Build
run: npm run build:npm
- name: Bundle size budget
run: npm run size