From 1c5b1301560f835890d68c99d5d0ea90f52536dd Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Sat, 22 May 2021 19:18:31 +0200 Subject: [PATCH] build: build locale files for legacy saucelabs job (#42230) Given that the locale files are now generated through Bazel, the files are no longer checked-in and the legacy TSC compilation fails due to imports resolving to non-existent files. We fix this for the legacy saucelabs job by copying the generated TS files into the sources (which is acceptable for the isolated CI job) PR Close #42230 --- .circleci/config.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 97788b2fed..d13e8add00 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -676,11 +676,6 @@ jobs: name: Starting Saucelabs tunnel service command: ./tools/saucelabs/sauce-service.sh run background: true - # add module umd tsc compile option so the test can work - # properly in the legacy browsers - - run: yarn tsc -p packages/tsconfig-legacy-saucelabs.json --module UMD - - run: yarn tsc -p modules --module UMD - - run: yarn bazel build //packages/zone.js:npm_package # Build test fixtures for a test that rely on Bazel-generated fixtures. Note that disabling # specific tests which are reliant on such generated fixtures is not an option as SystemJS # in the Saucelabs legacy job always fetches referenced files, even if the imports would be @@ -689,10 +684,26 @@ jobs: - run: name: Preparing Bazel-generated fixtures required in legacy tests command: | - yarn bazel build //packages/core/test:downleveled_es5_fixture + yarn bazel build \ + //packages/core/test:downleveled_es5_fixture \ + //packages/common/locales + # Needed for the ES5 downlevel reflector test in `packages/core/test/reflection`. + mkdir -p dist/all/@angular/core/test/reflection/ cp dist/bin/packages/core/test/reflection/es5_downleveled_inheritance_fixture.js \ dist/all/@angular/core/test/reflection/es5_downleveled_inheritance_fixture.js + # Locale files are needed for i18n tests running within Saucelabs. These are added + # directly as sources so that the TypeScript compilation of `/packages/tsconfig.json` + # can succeed. Note that the base locale and currencies files are checked-in, so + # we do not need to re-generate those through Bazel. + mkdir -p packages/common/locales/extra + cp dist/bin/packages/common/locales/*.ts packages/common/locales + cp dist/bin/packages/common/locales/extra/*.ts packages/common/locales/extra + # add module umd tsc compile option so the test can work + # properly in the legacy browsers + - run: yarn tsc -p packages/tsconfig-legacy-saucelabs.json --module UMD + - run: yarn tsc -p modules --module UMD + - run: yarn bazel build //packages/zone.js:npm_package - run: # Waiting on ready ensures that we don't run tests too early without Saucelabs not being ready. name: Waiting for Saucelabs tunnel to connect