Improve the testLatestDeps PR job
* Split out optional testLatestDeps job
* Revert "Split out optional testLatestDeps job"
This reverts commit
* alt
MODIFY
.github/workflows/pr.yml
.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

Improve the testLatestDeps PR job (#5364)

* Split out optional testLatestDeps job

* Revert "Split out optional testLatestDeps job"

This reverts commit 724e12557712552bf41699c85d59dac9eb0aa5c3.

* alt