Skip to content

Commit caad093

Browse files
committed
ci: consolidate Windows test jobs
The Windows CI test jobs are now contained within one `e2e-cli-win` job. This removes the need to start up multiple jobs to initialize Windows as well as store and retrieve the saved workspace. The parallelism is increased to 8 and the Windows test job is started earlier in the workflow to decrease the total time for the workflow.
1 parent dc2f678 commit caad093

File tree

2 files changed

+14
-44
lines changed

2 files changed

+14
-44
lines changed

.circleci/config.yml

Lines changed: 13 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -265,44 +265,29 @@ jobs:
265265
yarn admin snapshots --verbose --githubTokenFile=${HOME}/github_token
266266
267267
# Windows jobs
268-
# CircleCI support for Windows jobs is still in preview.
269-
# Docs: https://github.com/CircleCI-Public/windows-preview-docs
270-
setup-and-build-win:
268+
e2e-cli-win:
271269
executor: windows-executor
270+
parallelism: 8
272271
steps:
273272
- custom_attach_workspace
274273
- setup_windows
275274
- restore_cache:
276275
keys:
277276
- *cache_key_win
278277
- run: yarn install --frozen-lockfile --cache-folder ../.cache/yarn
279-
- run: yarn build
280278
- save_cache:
281279
key: *cache_key_win
282280
paths:
283281
- ~/.cache/yarn
284-
# Only jobs downstream from this one will see the updated workspace
285-
# https://circleci.com/blog/deep-diving-into-circleci-workspaces/
286-
- persist_to_workspace:
287-
root: *workspace_location
288-
paths:
289-
- ./*
290-
291-
test-win:
292-
executor: windows-executor
293-
steps:
294-
- custom_attach_workspace
295-
- setup_windows
296-
# Run partial e2e suite on PRs only. Master will run the full e2e suite with sharding.
297-
- run: if (Test-Path env:CIRCLE_PR_NUMBER) { node tests\legacy-cli\run_e2e.js "--glob={tests/basic/**,tests/i18n/extract-ivy*.ts,tests/build/profile.ts}" }
298-
299-
e2e-cli-win:
300-
executor: windows-executor
301-
parallelism: 4
302-
steps:
303-
- custom_attach_workspace
304-
- setup_windows
305-
- run: node tests\legacy-cli\run_e2e.js --nb-shards=$env:CIRCLE_NODE_TOTAL --shard=$env:CIRCLE_NODE_INDEX
282+
# Run partial e2e suite on PRs only. Release branches will run the full e2e suite.
283+
- run:
284+
name: Execute E2E Tests
285+
command: |
286+
if (Test-Path env:CIRCLE_PR_NUMBER) {
287+
node tests\legacy-cli\run_e2e.js "--glob={tests/basic/**,tests/i18n/extract-ivy*.ts,tests/build/profile.ts}" --nb-shards=$env:CIRCLE_NODE_TOTAL --shard=$env:CIRCLE_NODE_INDEX
288+
} else {
289+
node tests\legacy-cli\run_e2e.js --nb-shards=$env:CIRCLE_NODE_TOTAL --shard=$env:CIRCLE_NODE_INDEX
290+
}
306291
307292
workflows:
308293
version: 2
@@ -356,24 +341,10 @@ workflows:
356341
- build
357342

358343
# Windows jobs
359-
# These jobs only run after their non-windows counterparts finish successfully.
360-
# This isn't strictly necessary as there is no artifact dependency, but helps economize
361-
# CI resources by not attempting to build when we know it should fail.
362-
- setup-and-build-win:
363-
requires:
364-
# The Linux setup job also does checkout and rebase, which we get via the workspace.
365-
- setup
366-
- build
367-
- test-win:
368-
requires:
369-
- test
370-
- setup-and-build-win
371344
- e2e-cli-win:
372-
<<: *only_release_branches
373345
requires:
374-
- setup-and-build-win
375-
- e2e-cli
376-
346+
- test
347+
377348
# Publish jobs
378349
- snapshot_publish:
379350
<<: *only_release_branches

.github/angular-robot.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,10 @@ merge:
4242
requiredStatuses:
4343
- "ci/circleci: build"
4444
- "ci/circleci: setup"
45-
- "ci/circleci: setup-and-build-win"
4645
- "ci/circleci: lint"
4746
- "ci/circleci: validate"
4847
- "ci/circleci: test"
49-
- "ci/circleci: test-win"
48+
- "ci/circleci: e2e-cli-win"
5049
- "ci/circleci: e2e-cli"
5150
- "ci/circleci: test-browsers"
5251
- "ci/angular: size"

0 commit comments

Comments
 (0)