Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ jobs:
- run:
name: Builder
command: |
bazel build //...
LATEST_COMMIT=$(git rev-parse HEAD)
NUM_NOCHECKS=$(git diff-tree --no-commit-id --name-only -r $LATEST_COMMIT | grep .*.md | wc -l)
NUM_TOTAL=$(git diff-tree --no-commit-id --name-only -r $LATEST_COMMIT | wc -l)
if [ $NUM_NOCHECKS == $NUM_TOTAL ]
then
# Run build checks only if there are non-Markdown files in this change.
bazel build //...
fi
google-java-format:
docker:
- image: l.gcr.io/google/bazel
Expand All @@ -21,7 +28,14 @@ jobs:
- run:
name: Java Linter
command: |
bazel build //:google_java_format_verification
LATEST_COMMIT=$(git rev-parse HEAD)
NUM_JAVA=$(git diff-tree --no-commit-id --name-only -r $LATEST_COMMIT | grep .*.java | wc -l)
echo "$LATEST_COMMIT -> $NUM_JAVA"
# Run Java linter checks only if there are Java files in this change.
#if [ $NUM_JAVA != 0 ]
#then
#bazel build //:google_java_format_verification
#fi

# ======================= WORKFLOWS =======================

Expand Down