build: upgrade bazel rules to latest (#20768)

Add enough BUILD files to make it possible to
`bazel build packages/core/test`

Also re-format BUILD.bazel files with Buildifier.
Add a CI lint check that they stay formatted.

PR Close #20768
This commit is contained in:
Alex Eagle
2017-12-06 06:56:49 -08:00
committed by Jason Aden
parent 073f485c72
commit ef534c0cc1
61 changed files with 757 additions and 131 deletions

View File

@ -11,7 +11,7 @@
anchor_1: &job_defaults
working_directory: ~/ng
docker:
- image: angular/ngcontainer:0.0.6
- image: angular/ngcontainer:0.0.7
# After checkout, rebase on top of master.
# Similar to travis behavior, but not quite the same.
@ -26,6 +26,11 @@ jobs:
steps:
- checkout:
<<: *post_checkout
# Check BUILD.bazel formatting before we have a node_modules directory
# Then we don't need any exclude pattern to avoid checking those files
- run: buildifier -mode=diff $(find . -iname BUILD.bazel -type f)
- run: buildifier -mode=check $(find . -iname BUILD.bazel -type f)
- restore_cache:
key: angular-{{ .Branch }}-{{ checksum "yarn.lock" }}
@ -41,8 +46,8 @@ jobs:
key: angular-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run: bazel info release
- run: bazel run @yarn//:yarn
- run: bazel build packages/...
- run: bazel test @angular//...
- run: bazel build --config=ci packages/...
- run: bazel test --config=ci packages/... @angular//...
- save_cache:
key: angular-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths: