Skip to content

Commit 4074c57

Browse files
committed
test: add node-version verification to CI workflow
1 parent 4e6a606 commit 4074c57

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,32 @@ jobs:
2626
- name: Verify installation
2727
run: vp --version
2828

29+
test-node-version:
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
node-version: ["22", "24"]
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
37+
38+
- name: Setup Vite+ with Node.js ${{ matrix.node-version }}
39+
uses: ./
40+
with:
41+
node-version: ${{ matrix.node-version }}
42+
run-install: false
43+
cache: false
44+
45+
- name: Verify installation
46+
run: vp --version
47+
48+
- name: Verify Node.js version
49+
shell: bash
50+
run: |
51+
ACTUAL=$(node --version)
52+
echo "Node.js version: $ACTUAL"
53+
echo "$ACTUAL" | grep -q "^v${{ matrix.node-version }}\." || (echo "Expected Node.js v${{ matrix.node-version }}.x but got $ACTUAL" && exit 1)
54+
2955
test-cache-pnpm:
3056
runs-on: ubuntu-latest
3157
steps:

0 commit comments

Comments
 (0)