Skip to content

Commit 08532d1

Browse files
committed
Add workflow definition for fireperf end-to-end tests
1 parent 5986e67 commit 08532d1

File tree

2 files changed

+97
-2
lines changed

2 files changed

+97
-2
lines changed

.github/workflows/fireperf-e2e.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: FirePerf E2E Tests
2+
3+
on:
4+
pull_request:
5+
schedule:
6+
- cron: 4 */4 * * * # every 4 hours at 04 minutes past the hour
7+
8+
concurrency:
9+
group: ${{ github.workflow }}
10+
11+
env:
12+
PERF_E2E_GOOGLE_SERVICES: ${{ secrets.PERF_E2E_GOOGLE_SERVICES }}
13+
FTL_RESULTS_BUCKET: fireescape
14+
15+
jobs:
16+
prod:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout firebase-android-sdk
20+
uses: actions/checkout@v3
21+
- name: Checkout firebase-android-buildtools
22+
uses: actions/checkout@v3
23+
with:
24+
repository: FirebasePrivate/firebase-android-buildtools
25+
token: ${{ secrets.GOOGLE_OSS_BOT_TOKEN }}
26+
path: firebase-android-buildtools
27+
- name: Set up JDK 11
28+
uses: actions/setup-java@v2
29+
with:
30+
java-version: 11
31+
distribution: temurin
32+
cache: gradle
33+
- name: Set up NDK 21.4.7075529
34+
run: |
35+
ANDROID_ROOT=/usr/local/lib/android
36+
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
37+
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
38+
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
39+
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
40+
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
41+
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
42+
- name: Set up Python 3.10
43+
uses: actions/setup-python@v4
44+
with:
45+
python-version: '3.10'
46+
- name: Set up fireci
47+
run: pip3 install -e ci/fireci
48+
- uses: google-github-actions/auth@v0
49+
with:
50+
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
51+
- uses: google-github-actions/setup-gcloud@v0
52+
- name: Add google-services.json
53+
run: echo $PERF_E2E_GOOGLE_SERVICES | base64 -d > google-services.json
54+
- name: Run fireperf end-to-end tests
55+
run: fireci fireperf_e2e_test --plugin_repo_dir=firebase-android-buildtools --target_environment=prod
56+
57+
autopush:
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Checkout firebase-android-sdk
61+
uses: actions/checkout@v3
62+
- name: Checkout firebase-android-buildtools
63+
uses: actions/checkout@v3
64+
with:
65+
repository: FirebasePrivate/firebase-android-buildtools
66+
token: ${{ secrets.GOOGLE_OSS_BOT_TOKEN }}
67+
path: firebase-android-buildtools
68+
- name: Set up JDK 11
69+
uses: actions/setup-java@v2
70+
with:
71+
java-version: 11
72+
distribution: temurin
73+
cache: gradle
74+
- name: Set up NDK 21.4.7075529
75+
run: |
76+
ANDROID_ROOT=/usr/local/lib/android
77+
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
78+
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
79+
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
80+
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
81+
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
82+
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
83+
- name: Set up Python 3.10
84+
uses: actions/setup-python@v4
85+
with:
86+
python-version: '3.10'
87+
- name: Set up fireci
88+
run: pip3 install -e ci/fireci
89+
- uses: google-github-actions/auth@v0
90+
with:
91+
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
92+
- uses: google-github-actions/setup-gcloud@v0
93+
- name: Add google-services.json
94+
run: echo $PERF_E2E_GOOGLE_SERVICES | base64 -d > google-services.json
95+
- name: Run fireperf end-to-end tests
96+
run: fireci fireperf_e2e_test --plugin_repo_dir=firebase-android-buildtools --target_environment=autopush

ci/fireci/fireciplugins/fireperf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# limitations under the License.
1414

1515
import click
16-
import contextlib
1716
import logging
1817
import os
1918
import pathlib
@@ -38,7 +37,7 @@
3837
)
3938
@ci_command()
4039
def fireperf_e2e_test(target_environment, plugin_repo_dir):
41-
"""Run Firebase Performance end to end test."""
40+
"""Run Firebase Performance end-to-end test."""
4241

4342
_logger.info('Building fireperf plugin ...')
4443
with chdir(plugin_repo_dir):

0 commit comments

Comments
 (0)