Skip to content

Commit 0e1b959

Browse files
committed
ci: run bazel integration tests
1 parent b042d41 commit 0e1b959

File tree

4 files changed

+25
-45
lines changed

4 files changed

+25
-45
lines changed

.circleci/config.yml

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,18 @@ executors:
5858
NPM_CONFIG_PREFIX: ~/.npm-global
5959
resource_class: large
6060

61+
heavy-test-executor:
62+
parameters:
63+
nodeversion:
64+
type: string
65+
default: *default_nodeversion
66+
docker:
67+
- image: circleci/node:<< parameters.nodeversion >>-browsers
68+
working_directory: ~/ng
69+
environment:
70+
NPM_CONFIG_PREFIX: ~/.npm-global
71+
resource_class: 2xlarge+
72+
6173
windows-executor:
6274
# Same as https://circleci.com/orbs/registry/orb/circleci/windows, but named.
6375
working_directory: ~/ng
@@ -134,7 +146,9 @@ jobs:
134146
keys:
135147
- *cache_key
136148
- *cache_key_fallback
137-
- run: yarn install --frozen-lockfile
149+
# TODO: shouldn't have to disable frozen lockfile but CI seem to be bothered by yet and I want to test right now
150+
# - run: yarn install --frozen-lockfile
151+
- run: yarn install
138152
- persist_to_workspace:
139153
root: *workspace_location
140154
paths:
@@ -167,20 +181,13 @@ jobs:
167181
- custom_attach_workspace
168182
- run: yarn test --full
169183

170-
test-large:
171-
parameters:
172-
ve:
173-
type: boolean
174-
default: false
175-
glob:
176-
type: string
177-
default: ""
178-
executor: test-executor
179-
parallelism: 4
184+
integration:
185+
executor: heavy-test-executor
180186
steps:
181187
- custom_attach_workspace
182-
- run: yarn webdriver-update
183-
- run: yarn test-large --full <<# parameters.ve >>--ve<</ parameters.ve >> <<# parameters.glob >>--glob="<< parameters.glob >>"<</ parameters.glob >> --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX}
188+
- run:
189+
command: yarn bazel:integration
190+
no_output_timeout: 60m
184191

185192
e2e-cli:
186193
parameters:
@@ -247,17 +254,6 @@ jobs:
247254
- custom_attach_workspace
248255
- run: yarn build
249256

250-
# This is where we put all the misbehaving and flaky tests so we can fine-tune their conditions
251-
# and rerun them faster.
252-
flake-jail:
253-
executor: test-executor
254-
resource_class: medium
255-
steps:
256-
- custom_attach_workspace
257-
- run: yarn webdriver-update
258-
- run: yarn test-large --full --flakey --ve
259-
- run: yarn test-large --full --flakey
260-
261257
build-bazel:
262258
executor: action-executor
263259
resource_class: large
@@ -365,13 +361,8 @@ workflows:
365361
- test:
366362
requires:
367363
- build
368-
- test-large:
369-
requires:
370-
- build
371-
- test-large:
372-
name: test-large-ve
373-
ve: true
374-
glob: "packages/angular_devkit/@(build_angular|build_ng_packagr)/@(src|test)/@(build|browser)/*_spec_large.ts"
364+
# TODO: ng-packagr spec large also needs to be moved to bazel
365+
- integration:
375366
requires:
376367
- build
377368
- e2e-cli:
@@ -414,9 +405,6 @@ workflows:
414405
- test-browsers:
415406
requires:
416407
- build
417-
- flake-jail:
418-
requires:
419-
- build
420408

421409
# Windows jobs
422410
# These jobs only run after their non-windows counterparts finish successfully.

integration/build_angular/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ INTEGRATION_TESTS = [
6868
"//packages/angular_devkit/core:npm_package_archive": "@angular-devkit/core",
6969
"//packages/ngtools/webpack:npm_package_archive": "@ngtools/webpack",
7070
},
71+
# TODO: figure out if CI can handle this not being exclusive.
7172
tags = ["exclusive"],
7273
test_files = ":build_angular_sources",
7374
)

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"bazel:format": "find . -type f \\( -name \"*.bzl\" -or -name WORKSPACE -or -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs buildifier -v --warnings=attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,constant-glob,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,git-repository,http-archive,integer-division,load,load-on-top,native-build,native-package,output-group,package-name,package-on-top,positional-args,redefined-variable,repository-name,same-origin-load,string-iteration,unused-variable",
2424
"bazel:lint": "yarn bazel:format --lint=warn",
2525
"bazel:lint-fix": "yarn bazel:format --lint=fix",
26-
"bazel:test": "bazel test //...",
26+
"bazel:test": "bazel test //packages/... //etc/... ",
27+
"bazel:integration": "bazel test //integration/...",
2728
"build": "node ./bin/devkit-admin build",
2829
"build-tsc": "tsc -p tsconfig.json",
2930
"debug:test": "node --inspect-brk ./bin/devkit-admin test",

scripts/test.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ import { packages } from '../lib/packages';
1919

2020
const Jasmine = require('jasmine');
2121

22-
const knownFlakes = [
23-
// Rebuild tests in test-large are flakey if not run as the first suite.
24-
// https://github.com/angular/angular-cli/pull/15204
25-
'packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts',
26-
'packages/angular_devkit/build_angular/test/browser/web-worker_spec_large.ts',
27-
];
28-
2922
const projectBaseDir = join(__dirname, '..');
3023
require('source-map-support').install({
3124
hookRequire: true,
@@ -194,9 +187,6 @@ export default function(args: ParsedArgs, logger: logging.Logger) {
194187
}
195188
}
196189

197-
// Filter in/out flakes according to the --flakey flag.
198-
tests = tests.filter(test => !!args.flakey == knownFlakes.includes(test.replace(/[\/\\]/g, '/')));
199-
200190
if (args.shard !== undefined) {
201191
// Remove tests that are not part of this shard.
202192
const shardId = args['shard'];

0 commit comments

Comments
 (0)