Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/perf-gradle-compatibility-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,30 @@ jobs:
./gradlew \
:firebase-perf-gradle:functionalTest --tests \
"com.google.firebase.perf.plugin.transform.InstrumentationApiCompatTest.gradleBuildRunsInstrumentationForAllVariants_latestGradleAndAgp"
create-issue-on-failure:
needs: performance-plugin
if: failure()
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Create issue
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const issueTitle = 'Perf Gradle Compatibility test failed';

const { data: searchResults } = await github.rest.search.issuesAndPullRequests({
q: `is:issue is:open repo:${context.repo.owner}/${context.repo.repo} in:title "${issueTitle}"`,
});

if (searchResults.total_count === 0) {
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: issueTitle,
body: `https://github.com/firebase/firebase-android-sdk/actions/workflows/perf-gradle-compatibility-tests.yml`
assignees: ['tejasd'],
labels: ['bug', 'automated']
})
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public class InstrumentationApiCompatTest {
private static final String GRADLE_RELEASES_URL =
"https://api.github.com/repos/gradle/gradle/releases/latest";
// Latest verified versions. Update these as new versions are released and verified.
private static final String VERIFIED_AGP_VERSION = "9.2.0-alpha05";
private static final String VERIFIED_GRADLE_VERSION = "9.5.0-milestone-5";
private static final String VERIFIED_AGP_VERSION = "9.2.0-alpha08";
private static final String VERIFIED_GRADLE_VERSION = "9.4.1";
private final OkHttpClient client = new OkHttpClient();

@RegisterExtension public GradleBuildProject gradleBuildProject = new GradleBuildProject();
Expand Down Expand Up @@ -130,7 +130,6 @@ private String latestGradleVersion() {
JsonObject releaseObject = JsonParser.parseString(response.body().string()).getAsJsonObject();
return releaseObject.get("name").getAsString();
} catch (Exception e) {
// Catch all exceptions (IO, XML parsing, etc.) and wrap them
throw new RuntimeException(
"Failed to fetch or parse latest Gradle version: " + e.getMessage(), e);
}
Expand Down
Loading