Improve the testLatestDeps PR job (#5364)

* Split out optional testLatestDeps job

* Revert "Split out optional testLatestDeps job"

This reverts commit 724e125577.

* alt
This commit is contained in:
Trask Stalnaker 2022-02-16 17:56:57 -08:00 committed by GitHub
parent 789b23785e
commit 3a2b2626a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 2 deletions

View File

@ -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