| ## IMPORTANT |
| # If you change the `docker_image` version, also change the `cache_key` suffix |
| var_1: &docker_image angular/ngcontainer:0.0.8 |
| var_2: &cache_key angular-{{ .Branch }}-{{ checksum "examples/rollup/yarn.lock" }}-{{ checksum "examples/program/yarn.lock" }}-{{ checksum "internal/e2e/rollup/yarn.lock" }}-0.0.8 |
| |
| version: 2 |
| jobs: |
| build: |
| working_directory: ~/ng |
| docker: |
| - image: *docker_image |
| steps: |
| - checkout |
| |
| - restore_cache: |
| key: *cache_key |
| - run: bazel info release |
| |
| - run: bazel run @yarn//:yarn |
| - run: bazel build --config=ci ... |
| - run: bazel test --config=ci ... |
| # TODO(alexeagle): move this into the example proper |
| - run: bazel run examples/rollup -- --help |
| |
| # We should also be able to test targets in a different workspace |
| - run: bazel test --config=ci @program_example//... |
| - run: cd examples/packages && bazel test //:test_version_npm_install |
| - run: cd examples/packages && bazel test //:test_version_npm_no_lockfile |
| - run: cd examples/packages && bazel test //:test_version_yarn_install |
| |
| - save_cache: |
| key: *cache_key |
| paths: |
| - "examples/rollup/node_modules" |
| - "examples/program/node_modules" |
| - "internal/e2e/rollup/node_modules" |