Skip to content

Commit 9a30d3b

Browse files
committed
1 parent 6a0cf24 commit 9a30d3b

1 file changed

Lines changed: 14 additions & 32 deletions

File tree

.github/workflows/test.yml

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,57 +6,39 @@ on:
66
permissions:
77
contents: read
88

9+
.common-setup: &common-setup
10+
- name: Checkout your repository using git
11+
uses: actions/checkout@v4
12+
- name: Setup Node.js
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: '22'
16+
- name: Install dependencies
17+
run: npm ci
18+
919
jobs:
1020
test:
1121
runs-on: ubuntu-latest
1222
steps:
13-
- name: Checkout your repository using git
14-
uses: actions/checkout@v4
15-
- name: Setup Node.js
16-
uses: actions/setup-node@v4
17-
with:
18-
node-version: '22'
19-
- name: Install dependencies
20-
run: npm ci
23+
*common-setup
2124
- name: Test
2225
run: npm run test
2326
lint:
2427
runs-on: ubuntu-latest
2528
steps:
26-
- name: Checkout your repository using git
27-
uses: actions/checkout@v4
28-
- name: Setup Node.js
29-
uses: actions/setup-node@v4
30-
with:
31-
node-version: '22'
32-
- name: Install dependencies
33-
run: npm ci
29+
*common-setup
3430
- name: Lint
3531
run: npm run lint
3632
typecheck:
3733
runs-on: ubuntu-latest
3834
steps:
39-
- name: Checkout your repository using git
40-
uses: actions/checkout@v4
41-
- name: Setup Node.js
42-
uses: actions/setup-node@v4
43-
with:
44-
node-version: '22'
45-
- name: Install dependencies
46-
run: npm ci
35+
*common-setup
4736
- name: Typecheck
4837
run: npm run check
4938
build:
5039
runs-on: ubuntu-latest
5140
steps:
52-
- name: Checkout your repository using git
53-
uses: actions/checkout@v4
54-
- name: Setup Node.js
55-
uses: actions/setup-node@v4
56-
with:
57-
node-version: '22'
58-
- name: Install dependencies
59-
run: npm ci
41+
*common-setup
6042
- name: Build
6143
env:
6244
SKIP_BUILD_COMPRESS: 1

0 commit comments

Comments
 (0)