-
Notifications
You must be signed in to change notification settings - Fork 691
Expand file tree
/
Copy pathperf-gradle-compatibility-tests.yml
More file actions
59 lines (52 loc) · 2.07 KB
/
perf-gradle-compatibility-tests.yml
File metadata and controls
59 lines (52 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Perf Gradle Compatibility Tests
on:
schedule:
- cron: '0 6 * * *' # Run daily at 6 AM
workflow_dispatch: # Allow manual triggering
permissions:
contents: read
jobs:
performance-plugin:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 17
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: 17
distribution: temurin
# Do not update to version 6, context: https://blog.gradle.org/github-actions-for-gradle-v6
- name: Setup Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- name: Run tests
id: tests
run: |
./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']
})
}