Skip to content

Commit a410842

Browse files
Run npm tests in CI for PRs and master pushes
Update the pr-tests workflow to run when test files and package manifests change, and when matching changes are pushed to master. Run npm test before lint and build so CI validates Node unit tests automatically for both pre-merge and post-merge flows.
1 parent 9746218 commit a410842

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/pr-tests.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ on:
99
paths:
1010
- "src/**"
1111
- "build.mjs"
12+
- "tests/**"
13+
- "package.json"
14+
- "package-lock.json"
15+
- ".github/workflows/pr-tests.yml"
16+
push:
17+
branches:
18+
- "master"
19+
paths:
20+
- "src/**"
21+
- "build.mjs"
22+
- "tests/**"
23+
- "package.json"
24+
- "package-lock.json"
25+
- ".github/workflows/pr-tests.yml"
1226

1327
jobs:
1428
tests:
@@ -20,5 +34,6 @@ jobs:
2034
with:
2135
node-version: 20
2236
- run: npm ci
37+
- run: npm test
2338
- run: npm run lint
2439
- run: npm run build

0 commit comments

Comments
 (0)