Skip to content

Commit 7d69fab

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

File tree

2 files changed

+100
-2
lines changed

2 files changed

+100
-2
lines changed

.github/workflows/fireperf-e2e.yml

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