Skip to content

Commit e24c631

Browse files
committed
Set up CI
1 parent 083c2c9 commit e24c631

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

.github/workflows/ci.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Run linter
30+
run: npm run lint
31+
32+
- name: Build
33+
run: npm run build
34+
35+
- name: Run tests
36+
run: npm test
37+
38+
test-macos:
39+
runs-on: macos-latest
40+
41+
steps:
42+
- uses: actions/checkout@v4
43+
44+
- name: Use Node.js 20.x
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: 20.x
48+
cache: 'npm'
49+
50+
- name: Install dependencies
51+
run: npm ci
52+
53+
- name: Run linter
54+
run: npm run lint
55+
56+
- name: Build
57+
run: npm run build
58+
59+
- name: Run tests
60+
run: npm test
61+
62+
test-windows:
63+
runs-on: windows-latest
64+
65+
steps:
66+
- uses: actions/checkout@v4
67+
68+
- name: Use Node.js 20.x
69+
uses: actions/setup-node@v4
70+
with:
71+
node-version: 20.x
72+
cache: 'npm'
73+
74+
- name: Install dependencies
75+
run: npm ci
76+
77+
- name: Run linter
78+
run: npm run lint
79+
80+
- name: Build
81+
run: npm run build
82+
83+
- name: Run tests
84+
run: npm test

0 commit comments

Comments
 (0)