Skip to content

Commit d403714

Browse files
authored
Update node.js.yml
1 parent 463be2d commit d403714

1 file changed

Lines changed: 22 additions & 8 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
1-
name: Redirect
1+
name: Node.js CI
22

33
on:
44
push:
5-
branches:
6-
- master
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
78

89
jobs:
9-
redirect:
10+
build:
11+
1012
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [14.x, 16.x, 18.x]
17+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
18+
1119
steps:
12-
- uses: actions/checkout@v2
13-
- uses: ./.github/actions/redirect
14-
with:
15-
port: 8080
20+
- uses: actions/checkout@v3
21+
- uses: ./actions/redirect
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
cache: 'npm'
27+
- run: npm ci
28+
- run: npm run build --if-present
29+
- run: npm test

0 commit comments

Comments
 (0)