Skip to content

Commit e2b7354

Browse files
authored
Add option to run testLatestDeps on PRs (#5270)
1 parent 8b767ac commit e2b7354

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

.github/workflows/pr.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,29 @@ jobs:
114114
path: "**/javacore.*.txt"
115115
if-no-files-found: ignore
116116

117-
# testLatestDeps is intentionally not included in the PR workflow
118-
# because any time a new library version is released to maven central
119-
# it can fail due to test code incompatibility with the new library version,
120-
# or due to slight changes in emitted telemetry, which can be confusing for contributors
121-
# (muzzle can also fail when a new library version is released to maven central
122-
# but that happens much less often)
117+
testLatestDeps:
118+
runs-on: ubuntu-latest
119+
# testLatestDeps is not included in the PR workflow by default
120+
# because any time a new library version is released to maven central
121+
# it can fail due to test code incompatibility with the new library version,
122+
# or due to slight changes in emitted telemetry, which can be confusing for contributors
123+
# (muzzle can also fail when a new library version is released to maven central
124+
# but that happens much less often)
125+
if: ${{ contains(github.event.pull_request.labels.*.name, 'test latest deps') }}
126+
steps:
127+
- uses: actions/[email protected]
128+
129+
- name: Set up JDK 11 for running Gradle
130+
uses: actions/setup-java@v2
131+
with:
132+
distribution: adopt
133+
java-version: 11
134+
135+
- name: Test
136+
uses: gradle/gradle-build-action@v2
137+
with:
138+
arguments: test -PtestLatestDeps=true
139+
cache-read-only: true
123140

124141
smoke-test:
125142
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)