-
Notifications
You must be signed in to change notification settings - Fork 4
83 lines (63 loc) · 1.64 KB
/
ci.yaml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: CI
on:
push:
branches:
- "**"
pull_request:
branches:
- main
- master
workflow_dispatch: {}
permissions:
contents: read
jobs:
node_current:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: current
- name: Install required dependencies
run: npm install
- name: Audit dependencies
run: npm audit --audit-level high
- name: Run linters
run: npm run lint
- name: Pack
run: npm pack
- name: Run tests with coverage
run: npm run test:coverage:spec
- name: Show coverage report
run: npm run test:coverage:report
- name: Send coverage report
run: npx coveralls < coverage/lcov.info
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
- name: Clean after tests
run: npm run clean
- name: Check untracked files
run: for f in $(git ls-files --others --exclude-standard); do git diff --no-index --stat --exit-code /dev/null $f; done
node:
strategy:
fail-fast: false
matrix:
node-version:
- "22"
- "20"
- "18"
- "16"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install required dependencies
run: npm install
- name: Run tests
run: npm run test:spec