Skip to content

Commit c42041b

Browse files
devversionalxhub
authored andcommitted
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
1 parent 4957da8 commit c42041b

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

.circleci/config.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -669,11 +669,6 @@ jobs:
669669
name: Starting Saucelabs tunnel service
670670
command: ./tools/saucelabs/sauce-service.sh run
671671
background: true
672-
# add module umd tsc compile option so the test can work
673-
# properly in the legacy browsers
674-
- run: yarn tsc -p packages --module UMD
675-
- run: yarn tsc -p modules --module UMD
676-
- run: yarn bazel build //packages/zone.js:npm_package
677672
# Build test fixtures for a test that rely on Bazel-generated fixtures. Note that disabling
678673
# specific tests which are reliant on such generated fixtures is not an option as SystemJS
679674
# in the Saucelabs legacy job always fetches referenced files, even if the imports would be
@@ -682,10 +677,26 @@ jobs:
682677
- run:
683678
name: Preparing Bazel-generated fixtures required in legacy tests
684679
command: |
685-
yarn bazel build //packages/core/test:downleveled_es5_fixture
680+
yarn bazel build \
681+
//packages/core/test:downleveled_es5_fixture \
682+
//packages/common/locales
683+
686684
# Needed for the ES5 downlevel reflector test in `packages/core/test/reflection`.
685+
mkdir -p dist/all/@angular/core/test/reflection/
687686
cp dist/bin/packages/core/test/reflection/es5_downleveled_inheritance_fixture.js \
688687
dist/all/@angular/core/test/reflection/es5_downleveled_inheritance_fixture.js
688+
# Locale files are needed for i18n tests running within Saucelabs. These are added
689+
# directly as sources so that the TypeScript compilation of `/packages/tsconfig.json`
690+
# can succeed. Note that the base locale and currencies files are checked-in, so
691+
# we do not need to re-generate those through Bazel.
692+
mkdir -p packages/common/locales/extra
693+
cp dist/bin/packages/common/locales/*.ts packages/common/locales
694+
cp dist/bin/packages/common/locales/extra/*.ts packages/common/locales/extra
695+
# add module umd tsc compile option so the test can work
696+
# properly in the legacy browsers
697+
- run: yarn tsc -p packages --module UMD
698+
- run: yarn tsc -p modules --module UMD
699+
- run: yarn bazel build //packages/zone.js:npm_package
689700
- run:
690701
# Waiting on ready ensures that we don't run tests too early without Saucelabs not being ready.
691702
name: Waiting for Saucelabs tunnel to connect

0 commit comments

Comments
 (0)