From 3a2b2626a609ab5b0bf74ea54c1e0a0d8854cfca Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 16 Feb 2022 17:56:57 -0800 Subject: [PATCH] Improve the testLatestDeps PR job (#5364) * Split out optional testLatestDeps job * Revert "Split out optional testLatestDeps job" This reverts commit 724e12557712552bf41699c85d59dac9eb0aa5c3. * alt --- .github/workflows/pr.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cdfa42d724..a257deaf5f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -126,24 +126,33 @@ jobs: if-no-files-found: ignore testLatestDeps: - runs-on: ubuntu-latest # testLatestDeps is not included in the PR workflow by default # because any time a new library version is released to maven central # it can fail due to test code incompatibility with the new library version, # or due to slight changes in emitted telemetry, which can be confusing for contributors # (muzzle can also fail when a new library version is released to maven central # but that happens much less often) - if: ${{ contains(github.event.pull_request.labels.*.name, 'test latest deps') }} + # + # the condition is on the steps below instead of here on the job, because skipping the job + # causes the job to show up as canceled in the GitHub UI which prevents the build section from + # collapsing when everything (else) is green + # + # and the name is updated when the steps below are skipped which makes what's happening clearer + # in the GitHub UI + name: testLatestDeps${{ !contains(github.event.pull_request.labels.*.name, 'test latest deps') && ' (skipped)' || ''}} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - name: Set up JDK 11 for running Gradle + if: ${{ contains(github.event.pull_request.labels.*.name, 'test latest deps') }} uses: actions/setup-java@v2 with: distribution: adopt java-version: 11 - name: Test + if: ${{ contains(github.event.pull_request.labels.*.name, 'test latest deps') }} uses: gradle/gradle-build-action@v2 with: arguments: test -PtestLatestDeps=true