Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ggj][engx] fix: use a VM for CircleCI builds #367

Merged
merged 3 commits into from
Oct 5, 2020
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} \;
summer-ji-eng marked this conversation as resolved.
Show resolved Hide resolved
- 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