@@ -90,143 +90,11 @@ jobs:
9090 - name : Deduplicate dependencies
9191 run : pnpm dedupe --check
9292
93- run :
94- name : Run task
95- runs-on : ubuntu-latest
96- steps :
97- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
98- with :
99- persist-credentials : false
100- submodules : true
101-
102- - uses : oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.0
103- with :
104- save-cache : ${{ github.ref_name == 'main' }}
105- cache-key : run
106-
107- - uses : oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4
108-
109- - name : Build self
110- run : pnpm bootstrap-cli
111-
112- - name : Run self
113- run : vite run -r build
114-
115- - name : Print help for built-in commands
116- run : |
117- vite -h
118- vite run -h
119- vite lint -h
120- vite test -h
121- vite build -h
122- vite fmt -h
123-
124- cli-e2e-test :
125- name : CLI E2E test
126- strategy :
127- fail-fast : false
128- matrix :
129- include :
130- - os : ubuntu-latest
131- - os : namespace-profile-mac-default
132- runs-on : ${{ matrix.os }}
133- steps :
134- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
135- with :
136- persist-credentials : false
137- submodules : true
138-
139- - run : |
140- brew install rustup
141- rustup install stable
142- echo "PATH=/opt/homebrew/opt/rustup/bin:$PATH" >> $GITHUB_ENV
143- if: ${{ matrix.os == 'namespace-profile-mac-default' }}
144-
145- - uses : oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.0
146- with :
147- save-cache : ${{ github.ref_name == 'main' }}
148- cache-key : cli-e2e-test
149-
150- - uses : oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4
151-
152- - name : Build CLI
153- run : pnpm run bootstrap-cli
154-
155- - name : Run CLI lint
156- run : pnpm lint
157-
158- - name : Install Playwright browsers
159- run : pnpx playwright install chromium
160-
161- - name : Run CLI E2E tests
162- run : |
163- pnpm test
164- git diff --exit-code
165-
166- install-e2e-test :
167- name : vite install E2E test
168- # FIXME: Error: spawnSync esbuild ENOTSOCK
169- # runs-on: ubuntu-latest
170- runs-on : namespace-profile-mac-default
171- if : ${{ github.ref_name == 'main' }}
172- steps :
173- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
174- with :
175- persist-credentials : false
176- submodules : true
177-
178- - uses : oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.0
179- with :
180- save-cache : ${{ github.ref_name == 'main' }}
181- cache-key : install-e2e-test
182-
183- - uses : pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
184-
185- - uses : oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4
186-
187- - name : Build vite rust binary
188- run : cargo build --bin vite --release
189-
190- - name : Run vite install
191- run : |
192- export PATH=$PWD/target/release:$PATH
193-
194- # Test vite install on various repositories with different package managers
195- repos=(
196- # pnpm workspace
197- "pnpm/pnpm:pnpm"
198- "vitejs/vite:vite"
199- # yarn workspace
200- "napi-rs/napi-rs:napi-rs"
201- "toeverything/AFFiNE:AFFiNE"
202- # npm workspace
203- "npm/cli:npm"
204- "redhat-developer/vscode-extension-tester:vscode-extension-tester"
205- )
206-
207- for repo_info in "${repos[@]}"; do
208- IFS=':' read -r repo dir_name <<< "$repo_info"
209- echo "Testing vite install on $repo..."
210- # remove the directory if it exists
211- if [ -d "tmp/$dir_name" ]; then
212- rm -rf "tmp/$dir_name"
213- fi
214- git clone --depth 1 "https://github.com/$repo.git" "tmp/$dir_name"
215- cd "tmp/$dir_name"
216- vite install
217- # run again to show install cache increase by time
218- time vite install
219- echo "✓ Successfully installed dependencies for $repo"
220- echo ""
221- done
222-
22393 done :
22494 runs-on : ubuntu-latest
22595 needs :
22696 - test
22797 - lint
228- - run
229- - cli-e2e-test
23098 steps :
23199 - run : exit 1
232100 # Thank you, next https://github.com/vercel/next.js/blob/canary/.github/workflows/build_and_test.yml#L379
0 commit comments