diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d7f62ea67..a16592d04 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,15 +1,18 @@ -on: +'on': push: branches: - - master - pull_request: + - 1.64.0-sp + pull_request: null name: ci jobs: units: runs-on: ubuntu-latest strategy: matrix: - java: [7, 8, 11] + java: + - 7 + - 8 + - 11 steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 @@ -19,7 +22,6 @@ jobs: - run: .kokoro/build.sh env: JOB_TYPE: test - bazel: runs-on: ubuntu-latest container: gcr.io/gapic-images/googleapis-bazel:20210105 @@ -29,44 +31,48 @@ 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: name: test-artifacts path: ~/.cache/bazel/*/*/*/gax-java/bazel-out/*/testlogs/* retention-days: 5 - linkage-monitor: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11] + java: + - 8 + - 11 steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 @@ -74,10 +80,15 @@ jobs: java-version: ${{ matrix.java }} - run: java -version - name: Build and install local Maven repository - run: ./gradlew build publishToMavenLocal -x test -x signMavenJavaPublication - - name: Generate artifact list (linkage-monitor-artifacts.txt) for Linkage Monitor + run: >- + ./gradlew build publishToMavenLocal -x test -x + signMavenJavaPublication + - name: >- + Generate artifact list (linkage-monitor-artifacts.txt) for Linkage + Monitor run: ./gradlew createLinkageMonitorArtifactList - name: Check dependency conflicts with the latest Libraries BOM - uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor + uses: >- + GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor - name: Check dependency conflicts in the gax artifacts run: ./gradlew checkJavaLinkage