Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
ci: configure the protected branch (#1531)
Browse files Browse the repository at this point in the history
  • Loading branch information
chanseokoh authored Oct 15, 2021
1 parent b785ef9 commit 4a98eb6
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
on:
'on':
push:
branches:
- main
pull_request:
- 2.6.x
pull_request: null
name: ci
jobs:
units:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11]
java:
- 8
- 11
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
Expand All @@ -19,7 +21,6 @@ jobs:
- run: .kokoro/build.sh
env:
JOB_TYPE: test

bazel:
runs-on: ubuntu-latest
container: gcr.io/gapic-images/googleapis-bazel:20210105
Expand All @@ -29,32 +30,35 @@ jobs:
with:
java-version: 8
- run: java -version

- name: Bazel File Cache Setup
id: cache-bazel
uses: actions/cache@v2
with:
path: ~/.cache/bazel
key: ${{ runner.os }}-bazel-20210105-${{ secrets.CACHE_VERSION }}

- name: Bazel Cache Not Found
if: steps.cache-bazel.outputs.cache-hit != 'true'
run: |
echo "No cache found."
- name: Bazel Cache Found
if: steps.cache-bazel.outputs.cache-hit == 'true'
run: |
run: >
echo -n "Cache found. Cache size: "
du -sh ~/.cache/bazel
echo "If the cache seems broken, update the CACHE_VERSION secret in"
echo "https://github.com/googleapis/googleapis-discovery/settings/secrets/actions"
echo
"https://github.com/googleapis/googleapis-discovery/settings/secrets/actions"
echo "(use any random string, any GUID will work)"
echo "and it will start over with a clean cache."
echo "The old one will disappear after 7 days."
echo "The old one will disappear after 7 days."
- name: Run bazel tests
run: bazel --batch test //... --noshow_progress --test_output=errors

- uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
Expand Down

0 comments on commit 4a98eb6

Please sign in to comment.