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