-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (42 loc) · 1.33 KB
/
ci.yml
File metadata and controls
55 lines (42 loc) · 1.33 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, develop]
pull_request:
branches: [main, develop]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.2.2
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Run linting
run: npm run lint || true
- name: Run Prettier check
run: npm run format:check || true
- name: Run type checking
run: npm run type-check
continue-on-error: true
- name: Run tests with coverage
run: npm run test:coverage || npm run test -- --runInBand
- name: Upload coverage reports
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
if: always()
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
fail_ci_if_error: false
- name: Build package
run: npm run build
- name: Test package installation
run: |
npm pack
npm install -g *.tgz