Skip to content

Commit 55f4021

Browse files
committed
Add test step to CI
1 parent 1db95b3 commit 55f4021

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

.github/workflows/on-pull-request.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,32 @@ on:
88
permissions: write-all
99

1010
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version:
17+
- 16.x
18+
19+
steps:
20+
- name: Checkouting code...
21+
uses: actions/checkout@v3
22+
with:
23+
ref: ${{ github.head_ref }}
24+
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
30+
- name: NPM test
31+
run: npm run test
32+
1133
build:
1234

1335
runs-on: ubuntu-latest
36+
needs: test
1437

1538
strategy:
1639
matrix:
@@ -40,9 +63,6 @@ jobs:
4063
- name: NPM format check
4164
run: npm run format-check
4265

43-
- name: NPM test
44-
run: npm run test
45-
4666
- name: Lint
4767
run: npm run lint
4868

0 commit comments

Comments
 (0)