Skip to content

Commit 0493609

Browse files
committed
ci: re-enable windows CI
This commit fixes and re-enables windows CI. Upstream fixes: - devversion/rules_browsers#18 - angular/dev-infra#2966
1 parent 63f55af commit 0493609

File tree

3 files changed

+28
-24
lines changed

3 files changed

+28
-24
lines changed

.github/shared-actions/windows-bazel-test/action.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,25 @@ runs:
1818
steps:
1919
- name: Initialize WSL
2020
id: init_wsl
21-
uses: angular/dev-infra/github-actions/setup-wsl@7f2c99469dcf64fd466abf6cb53bede791d7599d
21+
uses: angular/dev-infra/github-actions/setup-wsl@66a623888d17a9f2f9f4558fad5b07e78dde525e
2222
with:
2323
wsl_firewall_interface: 'vEthernet (WSL (Hyper-V firewall))'
2424

25-
- name: Installing pnpm (in WSL)
26-
run: npm install -g pnpm@9
27-
shell: wsl-bash {0}
28-
2925
- name: Install node modules in WSL (re-using from previous install/cache restore)
3026
run: |
27+
export NVM_DIR="$HOME/.nvm"
28+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
29+
3130
cd ${{steps.init_wsl.outputs.repo_path}}
3231
pnpm install --frozen-lockfile
3332
shell: wsl-bash {0}
3433

3534
- name: Build test binary for Windows (inside WSL)
3635
shell: wsl-bash {0}
3736
run: |
37+
export NVM_DIR="$HOME/.nvm"
38+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
39+
3840
cd ${{steps.init_wsl.outputs.repo_path}}
3941
pnpm bazel \
4042
build --config=e2e //tests/legacy-cli:${{inputs.test_target_name}} --platforms=tools:windows_x64
@@ -54,6 +56,9 @@ runs:
5456
- name: Convert symlinks for Windows host
5557
shell: wsl-bash {0}
5658
run: |
59+
export NVM_DIR="$HOME/.nvm"
60+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
61+
5762
cd ${{steps.init_wsl.outputs.repo_path}}
5863
5964
runfiles_dir="/mnt/c/test/dist/bin/tests/legacy-cli/${{inputs.test_target_name}}_/${{inputs.test_target_name}}.bat.runfiles"

.github/workflows/pr.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -127,24 +127,23 @@ jobs:
127127
- name: Run CLI E2E tests
128128
run: pnpm bazel test --test_env=E2E_SHARD_TOTAL=6 --test_env=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }}
129129

130-
# Temporarily disabled due to https://github.com/Vampire/setup-wsl/issues/76.
131-
# e2e-windows-subset:
132-
# needs: build
133-
# runs-on: windows-2025
134-
# steps:
135-
# - name: Initialize environment
136-
# uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
137-
# - name: Setup Bazel
138-
# uses: angular/dev-infra/github-actions/bazel/setup@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
139-
# - name: Setup Bazel RBE
140-
# uses: angular/dev-infra/github-actions/bazel/configure-remote@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
141-
# with:
142-
# allow_windows_rbe: true
143-
# - name: Run CLI E2E tests
144-
# uses: ./.github/shared-actions/windows-bazel-test
145-
# with:
146-
# test_target_name: e2e_node22
147-
# test_args: --esbuild --glob "tests/basic/{build,rebuild}.ts"
130+
e2e-windows-subset:
131+
needs: build
132+
runs-on: windows-2025
133+
steps:
134+
- name: Initialize environment
135+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
136+
- name: Setup Bazel
137+
uses: angular/dev-infra/github-actions/bazel/setup@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
138+
- name: Setup Bazel RBE
139+
uses: angular/dev-infra/github-actions/bazel/configure-remote@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
140+
with:
141+
allow_windows_rbe: true
142+
- name: Run CLI E2E tests
143+
uses: ./.github/shared-actions/windows-bazel-test
144+
with:
145+
test_target_name: e2e_node22
146+
test_args: --esbuild --glob "tests/basic/{build,rebuild}.ts"
148147

149148
e2e-package-managers:
150149
needs: build

WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ http_archive(
281281

282282
git_repository(
283283
name = "rules_browsers",
284-
commit = "56ef8007ea07cd1916429bca8bb523433b0e9cdc",
284+
commit = "c9a70ad79258e2ffc498075623f9f974920a4025",
285285
remote = "https://github.com/devversion/rules_browsers.git",
286286
)
287287

0 commit comments

Comments
 (0)