ci: speed up lint job on CircleCI (#22526)
When I enabled bazel remote caching, I also switched to running buildifier and skylint from the package.json script, which builds them from head. With remote caching, we do get cache hits for these, but looking up the action inputs actually takes quite a bit of time since we have to first fetch the remote repository, then do loading and analysis, then read the inputs to determine the cache key. It's more important to keep the lint job fast, so I'm reverting that part of the change for now. We can experiment with building them from head in a less critical repo. PR Close #22526
This commit is contained in:
parent
ab790f3c84
commit
ec445b5c73
|
@ -41,14 +41,14 @@ jobs:
|
|||
steps:
|
||||
- checkout:
|
||||
<<: *post_checkout
|
||||
# See remote cache documentation in /docs/BAZEL.md
|
||||
- run: .circleci/setup_cache.sh
|
||||
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
||||
- *setup-bazel-remote-cache
|
||||
|
||||
- run: 'yarn buildifier -mode=check ||
|
||||
(echo -e "\nBUILD files not formatted. Please run ''yarn buildifier''" ; exit 1)'
|
||||
- run: 'yarn skylint ||
|
||||
# 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=check $(find . -type f \( -name BUILD.bazel -or -name BUILD \)) ||
|
||||
(echo "BUILD files not formatted. Please run ''yarn buildifier''" ; exit 1)'
|
||||
# Run the skylark linter to check our Bazel rules
|
||||
- run: 'find . -type f -name "*.bzl" |
|
||||
xargs java -jar /usr/local/bin/Skylint_deploy.jar ||
|
||||
(echo -e "\n.bzl files have lint errors. Please run ''yarn skylint''"; exit 1)'
|
||||
|
||||
- restore_cache:
|
||||
|
|
Loading…
Reference in New Issue