Skip to content
Merged
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
39 changes: 32 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,46 @@ version: 2.1
# ======================= JOBS =======================
jobs:
gapic-generator-java-tests:
docker:
- image: l.gcr.io/google/bazel
working_directory: /home/circleci/project/gapic-generator-java
working_directory: /tmp/
environment:
TEST_REPORTS_DIR: /tmp/workspace/bazel/reports/gapic-generator-java
BAZEL_VERSION: 3.5.1
PYTHON_VERSION: 3.5.2
machine: true
steps:
- checkout
- checkout:
path: gapic-generator-java
- attach_workspace:
at: workspace
- run:
name: Set Python version
command: |
pyenv global ${PYTHON_VERSION}
- run:
name: Install Bazel
command: |
wget https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh -O bazel_installer.sh
chmod +x bazel_installer.sh
./bazel_installer.sh --user
- run:
name: Make reports directory
command: |
mkdir -p ${TEST_REPORTS_DIR}
- run:
name: Build targets
name: Build targets for gapic-generator-java
command: |
cd /tmp/gapic-generator-java
bazel --batch build //...
- run:
name: Test targets
name: Run unit tests for gapic-generator-java
command: |
cd /tmp/gapic-generator-java
bazel --batch test //... --noshow_progress
find . -type f -regex ".*/bazel-testlogs/.*xml" -exec cp {} ${TEST_REPORTS_DIR} \;
- store_test_results:
path: ~/.cache/bazel
path: bazel/reports/gapic-generator-java
- store_artifacts:
path: bazel/reports/gapic-generator-java
google-java-format:
docker:
- image: l.gcr.io/google/bazel
Expand Down