Skip to content

Commit

Permalink
Merge pull request #2 from googleapis/circleci-project-setup
Browse files Browse the repository at this point in the history
[ggj][ci] Add builder and linter checks
  • Loading branch information
miraleung authored May 18, 2020
2 parents 35560b4 + f487815 commit 96ffdf3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 11 deletions.
40 changes: 30 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1
# Use a package of configuration called an orb.
orbs:
# Declare a dependency on the welcome-orb
welcome: circleci/welcome-orb@0.4.1
# Orchestrate or schedule a set of jobs

# ======================= JOBS =======================
jobs:
gapic-generator-java-tests:
docker:
- image: l.gcr.io/google/bazel
working_directory: /home/circleci/project/gapic-generator-java
steps:
- checkout
- run:
name: Builder
command: |
bazel build //...
google-java-format:
docker:
- image: l.gcr.io/google/bazel
working_directory: /home/circleci/workspace/gapic-generator-java
steps:
- checkout
- run:
name: Java Linter
command: |
bazel build //:google_java_format_verification
# ======================= WORKFLOWS =======================

workflows:
# Name the workflow "welcome"
welcome:
# Run the welcome/run job in its own container
version: 2
run_tests:
jobs:
- welcome/run
- gapic-generator-java-tests
- google-java-format
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ java_binary(
# are formatted correctly.
google_java_format_verification(
name = "google_java_format_verification",
srcs = glob(["src/**/*.java"]),
srcs = ["//src/main/java/com/google/api/generator:generator_files"],
formatter = "//:google_java_format_binary",
)

Expand Down

0 comments on commit 96ffdf3

Please sign in to comment.