Skip to content

Commit d2b4a9d

Browse files
authored
Update test.yml
1 parent 12e4695 commit d2b4a9d

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
name: test
1+
name: Node.js CI
2+
23
on:
34
push:
4-
branches: [master]
5+
branches: [ $default-branch ]
56
pull_request:
6-
branches:
7-
- "*"
7+
branches: [ $default-branch ]
8+
89
jobs:
910
build:
11+
1012
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [16.x, 18.x]
1117
steps:
12-
- name: Git checkout
13-
uses: actions/checkout@master
14-
- name: Install dependencies
15-
run: npm install
16-
- name: Run build
17-
run: npm run build
18+
- uses: actions/checkout@v3
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
cache: 'npm'
24+
- run: npm ci
25+
- run: npm run build

0 commit comments

Comments
 (0)