Skip to content

Commit 4e1c4c0

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

File tree

2 files changed

+88
-2
lines changed

2 files changed

+88
-2
lines changed

.github/workflows/fireperf-e2e.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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+
- uses: google-github-actions/auth@v0
35+
with:
36+
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
37+
- uses: google-github-actions/setup-gcloud@v0
38+
- name: Add google-services.json
39+
env:
40+
INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.PERF_E2E_GOOGLE_SERVICES }}
41+
run: |
42+
echo $PERF_E2E_GOOGLE_SERVICES | base64 -d > google-services.json
43+
- name: Run fireperf end-to-end tests
44+
env:
45+
PLUGIN_REPO_DIR: FirebasePrivate/firebase-android-buildtools
46+
run: |
47+
fireci fireperf_e2e_test --plugin_repo_dir=$PLUGIN_REPO_DIR --target_environment=prod
48+
49+
autopush:
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Checkout firebase-android-sdk
53+
uses: actions/checkout@v3
54+
- name: Checkout firebase-android-buildtools
55+
uses: actions/checkout@v3
56+
with:
57+
repository: FirebasePrivate/firebase-android-buildtools
58+
token: ${{ secrets.GOOGLE_OSS_BOT_TOKEN }}
59+
- name: Set up JDK 11
60+
uses: actions/setup-java@v2
61+
with:
62+
java-version: 11
63+
distribution: temurin
64+
cache: gradle
65+
- name: Set up NDK 21.4.7075529
66+
run: |
67+
ANDROID_ROOT=/usr/local/lib/android
68+
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
69+
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
70+
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
71+
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
72+
ln -sfn ${ANDROID_SDK_ROOT}/ndk/21.4.7075529 ${ANDROID_NDK_ROOT}
73+
echo "ANDROID_NDK_HOME=${ANDROID_NDK_ROOT}" >> $GITHUB_ENV
74+
- uses: google-github-actions/auth@v0
75+
with:
76+
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
77+
- uses: google-github-actions/setup-gcloud@v0
78+
- name: Add google-services.json
79+
env:
80+
INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.PERF_E2E_GOOGLE_SERVICES }}
81+
run: |
82+
echo $PERF_E2E_GOOGLE_SERVICES | base64 -d > google-services.json
83+
- name: Run fireperf end-to-end tests
84+
env:
85+
PLUGIN_REPO_DIR: FirebasePrivate/firebase-android-buildtools
86+
run: |
87+
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)