Skip to content

Commit 7849527

Browse files
authored
Update main.yaml
1 parent 3450db5 commit 7849527

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

.github/workflows/main.yaml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
11
name: CI
22

33
on:
4+
push:
5+
branches: [master]
46
pull_request:
57
branches: [master]
68

7-
# This workflow contains a single job called "npm_test"
89
jobs:
9-
npm_test:
10-
# The type of runner that the job will run on
10+
node_matrix_tests:
1111
runs-on: ubuntu-latest
12-
13-
# Steps represent a sequence of tasks that will be executed as part of the job
12+
strategy:
13+
matrix:
14+
node-version: [20, 22, 24]
1415
steps:
15-
# Checks-out your repository under $GITHUB_WORKSPACE
1616
- uses: actions/checkout@v3
1717
- uses: actions/setup-node@v3
1818
with:
19-
node-version: '^18.x'
20-
19+
node-version: ${{ matrix.node-version }}
2120
- name: Install Monorepo Deps
22-
run: npm i
23-
21+
run: npm ci
2422
- name: Run Test Cases
2523
run: npm run test --workspaces --if-present
26-
2724
- name: Run Lint Checks
28-
run: npm run lint --workspaces --if-present
25+
run: npm run lint --workspaces --if-present
26+
27+
npm_test:
28+
runs-on: ubuntu-latest
29+
needs: node_matrix_tests
30+
if: success()
31+
steps:
32+
- name: Final status
33+
run: echo "✅ All tests passed for Node.js 20, 22, and 24"

0 commit comments

Comments
 (0)