Skip to content

Commit bcb22ba

Browse files
committed
build: Add vite job
1 parent 1427bc9 commit bcb22ba

File tree

1 file changed

+58
-5
lines changed

1 file changed

+58
-5
lines changed

.github/workflows/ci.yml

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: ci
2-
on:
2+
on:
33
push:
4-
branches:
4+
branches:
55
- master
66
- next
77
tags:
@@ -52,7 +52,7 @@ jobs:
5252
path: dist*/
5353

5454
test-package-rollup:
55-
name: Test package on node ${{ matrix.node }} / ${{ matrix.os }} / rollup v${{ matrix.rollup }}
55+
name: 'rollup v${{ matrix.rollup }} / node ${{ matrix.node }} / ${{ matrix.os }}'
5656
needs:
5757
- build
5858
runs-on: ubuntu-latest
@@ -98,19 +98,72 @@ jobs:
9898

9999
- name: Install test package dependencies
100100
run: |
101-
npm install
101+
npm install
102102
npm install rollup@${{ matrix.rollup }} --force
103103
npx rollup -v
104104
working-directory: test/package/rollup
105105

106106
- name: Test package
107-
run: npm run test:package:rollup
107+
run: npm run test
108+
working-directory: test/package/rollup
109+
110+
test-package-vite:
111+
name: 'vite v${{ matrix.vite }} / node ${{ matrix.node }} / ${{ matrix.os }}'
112+
needs:
113+
- build
114+
runs-on: ubuntu-latest
115+
strategy:
116+
fail-fast: false
117+
matrix:
118+
node: ['22', '20', '18']
119+
os: [ubuntu-latest, windows-latest]
120+
vite: ['5', '6', '7']
121+
exclude:
122+
- os: windows-latest
123+
node: 20
124+
- os: windows-latest
125+
node: 18
126+
- vite: 7
127+
node: 18
128+
steps:
129+
- name: Checkout repo
130+
uses: actions/checkout@v5.0.0
131+
132+
- name: Setup node & npm
133+
uses: relative-ci/.github/actions/setup-node-npm@v1.1.5
134+
with:
135+
version: ${{ matrix.node }}
136+
cache: never
137+
install: false
138+
139+
- name: Install vitest
140+
run: npm install vitest
141+
142+
- name: Download build files
143+
uses: actions/download-artifact@v6.0.0
144+
with:
145+
name: build-artifacts
146+
147+
- name: Setup local npm registry
148+
run: ./scripts/setup-registry.sh
149+
150+
- name: Install test package dependencies
151+
run: |
152+
npm install
153+
npm install vite@${{ matrix.vite }} --force
154+
npx vite -v
155+
working-directory: test/package/vite
156+
157+
- name: Test package
158+
run: npm run test
159+
working-directory: test/package/vite
108160

109161
tests:
110162
needs:
111163
- lint
112164
- test-unit
113165
- test-package-rollup
166+
- test-package-vite
114167
runs-on: ubuntu-latest
115168
steps:
116169
- run: exit 0

0 commit comments

Comments
 (0)