-
Notifications
You must be signed in to change notification settings - Fork 5
68 lines (57 loc) · 1.38 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
name: CI
on:
push:
paths-ignore:
- "*.md"
branches:
- master
pull_request:
paths-ignore:
- "*.md"
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node_version:
- "18"
- "19"
- "20"
- "21"
- "22"
name: Node ${{ matrix.node_version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- name: install
run: npm ci
- name: build
run: npm run build
- name: Test
run: npm run test:ci
- name: Circular reference
if: ${{ matrix.node_version == '21' }}
run: npm run circular
- name: Lint
if: ${{ matrix.node_version == '21' }}
run: npm run lint
- name: Prettier
if: ${{ matrix.node_version == '21' }}
run: npm run prettier
- name: Coverage
if: ${{ matrix.node_version == '21' }}
run: npm run coverage:ci
- name: SonarCloud Scan
if: ${{ matrix.node_version == '21' }}
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}