Skip to content

Commit 9f1c179

Browse files
clydinalan-agius4
authored andcommitted
ci: move Windows CI job to GHA
The Windows E2E tests are now executed with a Github Action job via an additional entry in the existing E2E job's matrix. The CircleCI configuration previously needed to execute the job with CircleCI has also been removed.
1 parent f600bbc commit 9f1c179

File tree

5 files changed

+15
-122
lines changed

5 files changed

+15
-122
lines changed

.bazelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ build:remote --host_cpu=k8
150150
# Set up authentication mechanism for RBE
151151
build:remote --google_default_credentials
152152

153+
# Use HTTP remote cache
154+
build:remote-cache --remote_cache=https://storage.googleapis.com/angular-team-cache
155+
build:remote-cache --remote_accept_cached=true
156+
build:remote-cache --remote_upload_local_results=true
157+
build:remote-cache --google_default_credentials
158+
153159
###############################
154160
# NodeJS rules settings
155161
# These settings are required for rules_nodejs

.circleci/bazel.windows.rc

Lines changed: 0 additions & 8 deletions
This file was deleted.

.circleci/dynamic_config.yml

Lines changed: 1 addition & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
version: 2.1
1111

1212
orbs:
13-
browser-tools: circleci/[email protected]
1413
devinfra: angular/[email protected]
1514

1615
parameters:
@@ -24,7 +23,6 @@ parameters:
2423
# Windows needs its own cache key because binaries in node_modules are different.
2524
# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
2625
var_1: &cache_key v1-angular_devkit-16.14-{{ checksum "yarn.lock" }}
27-
var_1_win: &cache_key_win v1-angular_devkit-win-16.14-{{ checksum "yarn.lock" }}
2826
var_3: &default_nodeversion '18.13'
2927
var_3_major: &default_nodeversion_major '18'
3028
# The major version of node toolchains. See tools/toolchain_info.bzl
@@ -89,16 +87,6 @@ executors:
8987
working_directory: ~/ng
9088
resource_class: xlarge
9189

92-
windows-executor:
93-
# Same as https://circleci.com/orbs/registry/orb/circleci/windows, but named.
94-
working_directory: ~/ng
95-
resource_class: windows.large
96-
shell: powershell.exe -ExecutionPolicy Bypass
97-
machine:
98-
# Contents of this image:
99-
# https://circleci.com/developer/machine/image/windows-server-2022-gui
100-
image: 'windows-server-2022-gui:current'
101-
10290
# Command Definitions
10391
# https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-commands
10492
commands:
@@ -123,30 +111,12 @@ commands:
123111
base_revision: << pipeline.git.base_revision >>
124112
head_revision: << pipeline.git.revision >>
125113

126-
rebase_pr_win:
127-
steps:
128-
- devinfra/rebase-pr-on-target-branch:
129-
base_revision: << pipeline.git.base_revision >>
130-
head_revision: << pipeline.git.revision >>
131-
# Use `bash.exe` as Shell because the CircleCI-orb command is an
132-
# included Bash script and expects Bash as shell.
133-
shell: bash.exe
134-
135114
custom_attach_workspace:
136115
description: Attach workspace at a predefined location
137116
steps:
138117
- attach_workspace:
139118
at: *workspace_location
140119

141-
setup_windows:
142-
steps:
143-
- initialize_env
144-
- run: nvm install 18.13.0
145-
- run: nvm use 18.13.0
146-
- run: npm install -g [email protected] @bazel/bazelisk@${BAZELISK_VERSION}
147-
- run: node --version
148-
- run: yarn --version
149-
150120
setup_bazel_rbe:
151121
parameters:
152122
key:
@@ -265,50 +235,6 @@ jobs:
265235
command: yarn admin snapshots --verbose
266236
- fail_fast
267237

268-
# Windows jobs
269-
e2e-cli-win:
270-
executor: windows-executor
271-
parallelism: 12
272-
steps:
273-
- checkout
274-
- setup_windows
275-
- rebase_pr_win
276-
- setup_bazel_rbe
277-
- restore_cache:
278-
keys:
279-
- *cache_key_win
280-
- run:
281-
# We use Arsenal Image Mounter (AIM) instead of ImDisk because of: https://github.com/nodejs/node/issues/6861
282-
# Useful resources for AIM: http://reboot.pro/index.php?showtopic=22068
283-
name: 'Arsenal Image Mounter (RAM Disk)'
284-
command: |
285-
pwsh ./.circleci/win-ram-disk.ps1
286-
- run: yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
287-
- save_cache:
288-
key: *cache_key_win
289-
paths:
290-
- ~/.cache/yarn
291-
# Path where Arsenal Image Mounter files are downloaded.
292-
# Must match path in .circleci/win-ram-disk.ps1
293-
- ./aim
294-
- run:
295-
name: Execute E2E Tests
296-
environment:
297-
# Required by `yarn ng-dev`
298-
# See https://github.com/angular/angular/issues/46858
299-
PWD: .
300-
command: |
301-
mkdir X:/ramdisk/e2e
302-
bazel test --define=E2E_TEMP=X:/ramdisk/e2e --define=E2E_SHARD_TOTAL=$env:CIRCLE_NODE_TOTAL --define=E2E_SHARD_INDEX=$env:CIRCLE_NODE_INDEX --config=e2e //tests/legacy-cli:e2e.npm_node18
303-
# This timeout provides time for the actual tests to timeout and report status
304-
# instead of CircleCI stopping the job without test failure information.
305-
no_output_timeout: 40m
306-
- fail_fast
307-
- store_artifacts:
308-
path: dist/testlogs/tests/legacy-cli/e2e.npm_node18
309-
- store_test_results:
310-
path: dist/testlogs/tests/legacy-cli/e2e.npm_node18
311-
312238
workflows:
313239
version: 2
314240
default_workflow:
@@ -346,13 +272,8 @@ workflows:
346272
requires:
347273
- build
348274

349-
# Windows jobs
350-
- e2e-cli-win:
351-
<<: *only_release_branches
352-
353275
# Publish jobs
354276
- snapshot_publish:
355277
<<: *only_builds_branches
356278
requires:
357-
- setup
358-
- e2e-cli-win
279+
- build

.circleci/win-ram-disk.ps1

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,18 @@ jobs:
104104
e2e:
105105
strategy:
106106
matrix:
107-
os: [ubuntu-latest]
107+
os: [ubuntu-latest, windows-latest]
108108
node: [18]
109109
subset: [npm, yarn, esbuild]
110-
shard: [0, 1, 2, 3]
110+
shard: [0, 1, 2, 3, 4, 5]
111111
exclude:
112112
# Exclude Node.js v16 when running on a PR
113113
- node: ${{ github.event_name != 'pull_request' && 'none' || '16' }}
114+
# Exclude Windows when running on a PR
115+
- os: ${{ github.event_name != 'pull_request' && 'none' || 'windows-latest' }}
116+
# Skip yarn subset for Windows
117+
- os: windows-latest
118+
subset: yarn
114119
runs-on: ${{ matrix.os }}
115120
steps:
116121
- name: Initialize environment
@@ -124,4 +129,4 @@ jobs:
124129
- name: Setup Bazel RBE
125130
uses: angular/dev-infra/github-actions/bazel/configure-remote@ad327ca5766ef5dbf071a37056cee034bee258cd
126131
- name: Run CLI E2E tests
127-
run: yarn bazel test --define=E2E_SHARD_TOTAL=4 --define=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }}
132+
run: yarn bazel test --define=E2E_SHARD_TOTAL=6 --define=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }}

0 commit comments

Comments
 (0)