Commit Graph

238 Commits

Author SHA1 Message Date
Paul Gschwendtner 31116f0ced ci: re-enable material unit tests job (#33530)
The Material units tests job has been disabled with the
typescript upgrade PR since the components repository was
still on an old TypeScript version (due to cyclic dependencies
between the framework and components repository).

Since the components repository has been updated to `9.0.0-next.15`
and now uses the compatible TypeScript version, we can re-enable
ds

Related to this change, we need to ignore the `package.json`
engines when installing the dependencies of the components repo. This
is because the components repo already updated to NodeJS v12 and Yarn
v1.19.1. This is not the case for the CI setup of framework. For now,
since we don't want to change the dev setup (as it slows down
development), we temporarily disable the engines.

Additionally, the material unit tests job now depends on the actual
release packages (not on the ngtsc compiled ones). This is because
the components repo setup relies on NGCC being run. This is also
helpful for validating ngcc against the framework packages.

PR Close #33530
2019-11-01 17:38:39 +00:00
George Kalpakas efbbae5a48 ci: publish tarballs for all Angular packages as build artifacts on PR builds (#33321)
Previously, when one wanted to try out the changes from a PR before it
was merged, they had to check out the PR locally and build the Angular
packages themselves (which is time-consuming and wasteful given that the
packages have already been built on CI).

This commit persists all Angular packages on each build as `.tgz` files,
which can be used to install dependencies on an project (supported by
both [npm][1] and [yarn][2]). In addition to individual `.tgz` files for
each package, a `.tgz` file including all packages is also stored, which
can be used to test the packages locally by overwriting the ones in the
`node_modules/` directory of a project.

CircleCI [build artifacts][3] an be used for longer-term storage of the
outputs of a build and are designed to be useful around the time of the
build, which suits our needs.

[1]: https://docs.npmjs.com/cli/install.html
[2]: https://yarnpkg.com/lang/en/docs/cli/add
[3]: https://circleci.com/docs/2.0/artifacts

PR Close #33321
2019-10-24 09:56:21 -07:00
George Kalpakas 22e483858e ci: use YAML aliases to define branch filters for CircleCI jobs (#33321)
PR Close #33321
2019-10-24 09:56:21 -07:00
Joey Perrott a86a179f45 build: use http caching on windows CI runs (#33298)
PR Close #33298
2019-10-22 13:09:28 -04:00
Joey Perrott fa0ab38546 build: update circleci config to handle GOOGLE_APPLICATION_CREDENTIALS for all linux bazel builds (#33109)
PR Close #33109
2019-10-21 15:56:51 -04:00
Igor Minar 86e1e6c082 feat: typescript 3.6 support (#32946)
BREAKING CHANGE: typescript 3.4 and 3.5 are no longer supported, please update to typescript 3.6

Fixes #32380

PR Close #32946
2019-10-18 13:15:16 -04:00
Matias Niemelä 117ca7cf39 revert: build: use http caching on windows CI runs (#33238) (#33254)
This reverts commit 7fb55f29b6.

PR Close #33254
2019-10-18 12:08:59 -04:00
Joey Perrott 7fb55f29b6 build: use http caching on windows CI runs (#33238)
PR Close #33238
2019-10-18 11:32:36 -04:00
Paul Gschwendtner b60541c92a ci: update commit for material-unit-tests job (#33221)
Updates the commit of the Angular components repository for
which the `material-unit-tests` job runs tests against. We need to
update to the latest commit at the time of writing, in order to be able
to remove the gesture tests from the material-ci/blocklist.

This is now possible because the Angular components repository
removes the dependency on `hammerjs` completely.

PR Close #33221
2019-10-17 14:14:53 -04:00
Greg Magolan dcbc3b197d ci: update material-unit-test commit (#33073)
Updates the `material-unit-test` job to run tests against
the latest commit of the Angular Components repository.

The components repository updated to rules_nodejs#0.38.2 before Angular Bazel did.
To do this, the `@angular/bazel` v0.38.2 compatibility changes were patched on postinstall.

This now conflicts because we install a `@angular/bazel` version in the `material-unit-tests` job
that already includes these compatibility changes. This would result in the patch being a noop
for which the `patch` command throws an error.

We can remove this once components can install a released version of `@angular/bazel` that is
compatible with `rules_nodejs#0.38.2`.

PR Close #33073
2019-10-14 20:25:57 +00:00
Joey Perrott 68f06c8dd6 build: using the xlarge resource class for zonejs tests on CI (#33148)
Fixes #33147

PR Close #33148
2019-10-14 20:13:26 +00:00
Paul Gschwendtner 3830f6fc14 ci: update material-unit-test commit (#32889)
Updates the `material-unit-test` job to run tests against
the latest commit of the Angular Components repository.

We need to update to a version where components already
updated to `rules_nodejs#0.38.0`.

PR Close #32889
2019-10-08 09:27:11 -07:00
George Kalpakas 442f323a32 ci: shorten the display name of `init_environment` steps that are shown in all jobs (#32998)
The `init_environment` custom command is used in almost all other jobs.
The this is implemented in CircleCI is that the steps of the command are
inlined into the other jobs.

Some of the `init_environment` commands are quite long and (since the
default display name for a step is its command) they clutter the
CircleCI UI. Additionally, multiple related commands are shown as
separate steps, which makes it more difficult to get to the actual steps
of a job.

This commit improves this by:
1. Defining explicit, short names for steps with long commands.
2. Grouping multiple related steps into one.

PR Close #32998
2019-10-04 08:39:20 -07:00
George Kalpakas eb72cecc42 build(docs-infra): turn on Ivy (#32923)
The angular.io project uses Angular and CLI v9, which by default turns
on Ivy mode. However, since ec4381dd4, we explicitly opt out of Ivy.

This commit removes the `enabledIvy: false` configuration, thus allowing
the default behavior of having Ivy on.

NOTE:
This commit only changes the angular.io projects. The docs examples need
to be updated separately (first to Angular and CLI v9 and then to Ivy).

PR Close #32923
2019-10-04 08:27:21 -07:00
Filipe Silva 0f3a48e4d4 ci: refactor notification commands into a single parametrized one (#32745)
notify_caretaker_on_fail and notify_dev_infra_on_fail are the same, except for the url they notify.

PR Close #32745
2019-10-02 09:34:12 -07:00
Filipe Silva 653eb0fef9 ci: use workspaces and cache for Windows jobs (#32745)
Making use of these functionalities lets our Windows jobs be more similar to the Linux ones, and draw common artifacts from them too.

PR Close #32745
2019-10-02 09:34:12 -07:00
Filipe Silva fc3260d87e ci: use CircleCI parameterized jobs (#32745)
Parameterized jobs lets us reduce duplication of very similar jobs.

See https://circleci.com/docs/2.0/reusing-config/#authoring-parameterized-jobs for more info.

PR Close #32745
2019-10-02 09:34:11 -07:00
Filipe Silva 296954041e ci: use CircleCI commands (#32745)
When we needed to run multiple commands in a reusable fashion, we needed to make a giant run block with multiple things inside. Using custom commands gives us a better way to do this.

See https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-commands for more info.

PR Close #32745
2019-10-02 09:34:11 -07:00
Filipe Silva 1115961892 ci: keep cache key fallback in a var (#32745)
This way it's right next to the original key and it's easier to keep them in sync.

PR Close #32745
2019-10-02 09:34:11 -07:00
Filipe Silva 6db5c4a6f6 ci: use CircleCI executors (#32745)
Executors let you define custom execution contexts for jobs.

See https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-executors for more information.

PR Close #32745
2019-10-02 09:34:11 -07:00
Joey Perrott 252966bcca ci: build bazel saucelabs tests remotely (#32719)
PR Close #32719
2019-09-17 15:14:17 -07:00
Joey Perrott 894c4b5390 ci: use automatic selection strategies (#32678)
Removes the selection strategies for `AngularTemplateCompile` and `TypeScriptCompile` causing
them to use the automatic selection strategies instead.

PR Close #32678
2019-09-16 15:35:37 -07:00
Joey Perrott 4ff9c942c0 ci: use remote strategy for AngularTemplateCompile and TypeScriptCompile (#32678)
PR Close #32678
2019-09-16 15:35:37 -07:00
George Kalpakas 43bbc409a2 ci: pin docker images by ID for hermeticity (#32602)
Previously, the docker images used on CI where specified by a tag
(`10.16` and `10.16-browsers`). Since tags are not immutable, this only
pins specific characteristics of the environment (e.g. the OS type and
the Node.js version), but not others. Especially when using a tag that
does not specify the patch version (e.g. `10.16` instead of `10.16.0`),
it is inevitable that the image will change at some point, potentially
leading to unrelated failures due to changes in the environment.

One source of such failures can be the Chrome version used in tests.
Since we install a specific ChromeDriver version (that is only
compatible with specific Chrome version ranges), unexpectedly updating
to a newer Chrome version may break the tests if the new version falls
outside the range of supported version for our pinned ChromeDriver.

Using a tag that specifies the patch version (e.g. `10.16.0`) or even
the OS version (e.g. `10.16.0-buster`) is safer (i.e. has a lower
probability of introducing the kind of breakages described above), but
is still not fully hermetic.

This commit prevents such breakages by pinning the docker images by ID.
Image IDs are based on the image's digest (SHA256) and are thus
immutable, ensuring that all CI jobs will be running on the exact same
image.

See [here][1] for more info on pre-built CircleCI docker images and more
specifically [pinning images by ID][2].

[1]: https://circleci.com/docs/2.0/circleci-images
[2]: https://circleci.com/docs/2.0/circleci-images#using-a-docker-image-id-to-pin-an-image-to-a-fixed-version

PR Close #32602
2019-09-11 12:34:14 -04:00
George Kalpakas 65f5c0476f ci: check code-ownership on CI (#32577)
This commit expands the `lint` CircleCI job to also run the
`tools/verify-codeownership.js` script. This script verifies that some
important files/directories in the codebase have code-owners assigned in
`.github/CODEOWNERS`.

The main purpose of this change is to prevent adding new directories
(e.g. packages or docs guides/examples) without assigning appropriate
code-owners. When no code-owner is explicitly assigned, corresponding
PRs will automatically request reviews from @igorminar, who is the
"fall-back" code-owner.

PR Close #32577
2019-09-10 17:30:55 -04:00
Greg Magolan f937f8f604 ci: update material-unit-tests commit (#32485)
Updates the SHA that will be tested against in the `material-unit-tests` job
to the latest commit in the components repository. SHA 2817c9e2faa4140342336987a692d5dd30bf24c2
is needed in order to make the `material-unit-tests` job pass after the remove
of the `protractor_web_test_suite` bazel rule from @angular/bazel. `protractor_web_test_suite` is
now provided by the @bazel/protractor npm package.

PR Close #32485
2019-09-10 15:19:31 -04:00
George Kalpakas b5eda603a2 ci: work around `CIRCLE_COMPARE_URL` not being available wih CircleCI Pipelines (#32537)
The commit range that is associated with a CI build is used for a couple
of things (mostly related to payload-size tracking):
- Determine whether a size change was caused by application code or
  dependencies (or both).
- Add the messages of the commits associated with the build (and thus
  the payload-size change).

NOTE: The commit range is only used on push builds.

Previously, the commit range was computed based on the
`CIRCLE_COMPARE_URL` environment variable. With [CircleCI Pipelines][1]
enabled, `CIRCLE_COMPARE_URL` is no longer available and the commit
range cannot be reliably detected.

This commit switches `CI_COMMIT_RANGE` to only include the last commit.
This can be less accurate in some rare cases, but is true in the
majority of cases (on push builds). Additionally, it stores the CircleCI
build URL in the database along with the payload data, so the relevant
info can be retrieved when needed.

[1]: https://circleci.com/docs/2.0/build-processing

PR Close #32537
2019-09-09 12:21:44 -04:00
George Kalpakas 497d6b1323 ci: re-run flaky docs examples e2e tests in `test_docs_examples[_ivy]` jobs (#32497)
The docs examples e2e tests have been quite flaky recently. This causes
the `test_docs_examples` and `test_docs_examples_ivy` CircleCI jobs to
often fail (and block PRs) without a real reason.

This commit adds support for re-running failed docs examples e2e tests
and configures the `test_docs_examples` and `test_docs_examples_ivy`
jobs to try running each test that fails a second time, before giving up
and marking it as failed.

Closes #31841
Closes #31842

PR Close #32497
2019-09-05 18:10:31 -04:00
Joey Perrott 4b1251106e build: bump yarn requirement to 1.17.3 (#32344)
PR Close #32344
2019-08-28 17:13:05 -07:00
Joey Perrott e79ba194b4 ci: remove unused artifact uploads from test job (#32292)
These were initally added to allow for CircleCI to provide a better failure UI using junit data.
This information is not currently being created for bazel tests and once it is created it will
be available on the cloud status pages created by the BEP for each bazel execution.

PR Close #32292
2019-08-26 09:56:29 -07:00
Joey Perrott a367b90a82 ci: copy bazelrc files to home RC locations (#32251)
PR Close #32251
2019-08-21 17:08:40 -07:00
Paul Gschwendtner daac386f4d ci: update material-unit-tests commit (#32243)
Updates the SHA that will be tested against in the `material-unit-tests` job
to the latest commit in the components repository. SHA 18b9ef3f5529f0fa8f034944681486447af7b879
is needed in order to make the newly introduced material-ci test blocklist effective.

PR Close #32243
2019-08-21 10:41:51 -07:00
Kara Erickson dd6070a49b ci: update material commit we use to run integration tests (#32220)
We need to update the commit so we can make Hammer support optional in 32203.

PR Close #32220
2019-08-20 14:26:16 -07:00
Igor Minar bb3c684b98 ci: exclude the upstream g3 branch from building on CI (#32202)
We don't need to build this branch as it's informative for the purposes of figuring out
the diff between the master and what's synced into google3.

PR Close #32202
2019-08-20 09:55:55 -07:00
Filipe Silva 0b1bf14cd8 ci: use circleci windows preview (#31266)
PR Close #31266
2019-08-19 13:32:14 -07:00
Filipe Silva d1cc7a0b26 ci: use no_output_timeout for long jobs (#31266)
PR Close #31266
2019-08-19 13:32:13 -07:00
Joey Perrott 43163523f6 ci: move bazel saucelabs execution to script to be used across all Angular repos (#32141)
PR Close #32141
2019-08-16 09:57:23 -07:00
Paul Gschwendtner 4d96cf5197 ci: update material-unit-tests job to latest commit (#31650)
Updates the `material-unit-tests` job to the latest commit
on the components repository. 097f4335a4e0b6e6b579829ae3a9cffce6292d2b.

This commit ensures that the postinstall script does not run NGC
on schematic code from `@angular/core`. Running NGC on the
generated schematic code can cause unexpected issues as some
migrations import types directly from `@angular/compiler-cli`
while the entry-point is not usable in all cases.

See: https://github.com/angular/angular/issues/29220.

PR Close #31650
2019-08-13 14:40:52 -07:00
Joey Perrott 6215636bc6 ci: use local strategy for AngularTemplateCompile and TypescriptCompile on CI (#32112)
PR Close #32112
2019-08-13 09:57:50 -07:00
George Kalpakas a574e462c9 build(docs-infra): ensure the locally built packages exist and are up-to-date in `yarn setup-local` (#31985)
The `setup-local` npm script uses `NgPackagesInstaller` to replace the
Angular packages with the locally built ones. Previously, it would (a)
assume that the packages were built and (b) it would do anything if the
currently installed versions already correspond to locally built
packages (even if not the latest version).
This could lead to all sorts of errors, such as:
- Confusing error messages, `dist/packages-dist/` was missing.
- Using outdated build artifacts from `dist/packages-dist/` without a
  warning.
- Not installing the latest locally built packages, because the ones
  installed already corresponded to locally built (but older) ones.

This commit fixes these issues by ensuring that:
- The local packages are always built before being used by
  `NgPackagesInstaller`.
- The local packages are installed, even if the ones install already
  correspond to local packages.

NOTE: Special `*-ci` scripts are introduced (for use on CI) that skip
      building the local packages, since that step would have been taken
      care of (in a more efficient way) in a previous CI step.

PR Close #31985
2019-08-05 12:56:44 -07:00
Paul Gschwendtner 0cd4c019cf build: lock material unit tests job to specific commit (#31569)
No longer locks the Material unit tests job to a specific branch, but rather allows
locking to a specific commit from a given branch. This allows us to use the
"master" branch from the `components` repository.

PR Close #31569
2019-07-25 13:08:33 -07:00
JoostK 7e46a6d99d test(ivy): update Material to recent commit from master branch (#31569)
Previously, the ivy-2019 branch of the Material (aka components) repo was
used, which contains some changes that were necessary to work with Ivy.
These changes are not longer necessary, as Material's master branch is
fully working with Ivy today. To be up-to-date with recent Material
development and its support for more recent dependencies, e.g. TypeScript,
it is desirable for us to be on a newer version of Material.

This commit moves the Material tests away from the ivy-2019 branch, to a
recent commit on master. We are not targeting the master branch itself,
as that would introduce a moving target into Angular's CI checks, which
is undesirable.

Lastly, the usage of gulp to run Material's tests is changed into using
Bazel, as Material itself is now also built with Bazel.

PR Close #31569
2019-07-25 13:08:33 -07:00
JiaLiPassion 87ce4e997b fix(zone.js): zone-mix should import correct browser module (#31628)
Close #31626

PR Close #31628
2019-07-24 14:33:07 -07:00
George Kalpakas f10d6c66c9 ci: add info about `test_saucelabs_bazel` being limited to master builds (#31651)
Follow-up to #31636 (see
https://github.com/angular/angular/pull/31636#discussion_r305120859)

PR Close #31651
2019-07-19 09:57:32 -07:00
George Kalpakas 7b6ee5e0d9 ci: move the `test_saucelabs_bazel` CircleCI job to `default_workflow` (#31636)
Previously, the `test_saucelabs_bazel` job was run as part of the
`saucelabs_test` workflow every hour (for every "publish branch";
currently 8.0.x, 8.1.x and master).

Since this job runs a subset of the tests in
`legacy-unit-tests-saucelabs` (see [BUILD.bazel][1]) and is just a
proof-of-concept for running tests on SauceLabs via bazel, there is
little point in running is on all branches. It is also wasteful to run
it every hour, even if there were no changes pushed into the branch
since the last run.

This commit makes the job part of `default_workflow`, but limits it to
only be run on master builds (not on other branches or PRs). Based on
its recent history, the job is relatively stable and (since it will only
be run on master builds) it is not expected to affect our dev workflow.

[1]: https://github.com/angular/angular/blob/ef44f51d5/BUILD.bazel#L66-L92

PR Close #31636
2019-07-18 16:45:27 -07:00
George Kalpakas e822394075 refactor: group similar jobs in `config.yml > default_workflow` (#31636)
PR Close #31636
2019-07-18 16:45:27 -07:00
Joey Perrott 32aa18be78 build: add tsconfig-test to dependency for tsconfig in core/test/strict_types (#31471)
PR Close #31471
2019-07-12 11:38:16 -04:00
Joey Perrott e44ba0ffa9 build: use standalone strategy for TypescriptCompile and AngularTemplateCompile (#31471)
PR Close #31471
2019-07-12 11:38:16 -04:00
Alex Eagle 14ad7562c6 build: use remote actions for TS/NG compilations on CircleCI (#31471)
PR Close #31471
2019-07-12 11:38:16 -04:00
George Kalpakas 0e86551a63 ci(docs-infra): run a11y audits on certain pages on CI (#31414)
PR Close #31414
2019-07-11 17:13:47 -04:00