Add option to run testLatestDeps on PRs (#5270)

This commit is contained in:
Trask Stalnaker 2022-01-31 09:41:12 -08:00 committed by GitHub
parent 8b767ac435
commit e2b7354290
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 6 deletions

View File

@ -114,12 +114,29 @@ jobs:
path: "**/javacore.*.txt"
if-no-files-found: ignore
# testLatestDeps is intentionally not included in the PR workflow
# 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)
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') }}
steps:
- uses: actions/checkout@v2.3.4
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11
- name: Test
uses: gradle/gradle-build-action@v2
with:
arguments: test -PtestLatestDeps=true
cache-read-only: true
smoke-test:
runs-on: ${{ matrix.os }}