This commit moves the build-related scripts (`build-ivy-npm-packages.js`, `build-packages-dist.js` and `package-builder.js`) to a dedicated directory to keep the `scripts/` directory cleaner. It also moves the logic for building the `zone.js` package to a separate script, `zone-js-builder.js`, to make it re-usable. A subsequent commit will use it to build the `zone.js` package when building the Ivy Angular packages as well. PR Close #35780
1.6 KiB
Debugging the components-repo-unit-tests job
Currently all changes to Ivy are validated against the test suite of the
angular/components repository. In order to debug the components-repo-unit-tests CI
job, the following steps can be used:
1) Build the Ivy package output by running node ./scripts/build/build-ivy-npm-packages.js in
the angular/angular repo.
2) Clone the angular/components repository if not done yet (quick link to repo).
3) Set up the package output in the angular/components repository by running the following
command in the angular/angular repo:
node ./scripts/ci/update-deps-to-dist-packages.js {COMPONENTS_REPO}/package.json ./dist/packages-dist-ivy-aot
4) Switch into the angular/components repository and run the tests by using the
following command:
yarn test --deleted_packages=//src/dev-app --config=ivy
Running tests for individual entry-points
The yarn test script from the components repository runs all tests in the project.
This is sometimes not desired because it involves building and testing of all packages
and entry-points. Running tests for an individual entry-point is possible by explicitly
selecting a given test target.
Here is an example of commands that run individual test targets. Note that it is
important to specify the --config=ivy flag in order to run tests with Ivy.
yarn bazel test --config=ivy src/material/slider:unit_tests
yarn bazel test --config=ivy src/cdk/a11y:unit_tests
yarn bazel test --config=ivy src/material/toolbar:unit_tests