Skip to content

FirePerf E2E Tests #8168

FirePerf E2E Tests

FirePerf E2E Tests #8168

Workflow file for this run

name: FirePerf E2E Tests
on:
schedule:
- cron: 4 */4 * * * # every 4 hours at 04 minutes past the hour
workflow_dispatch: # allow triggering the workflow manually
concurrency:
group: ${{ github.workflow }}
env:
PERF_E2E_GOOGLE_SERVICES: ${{ secrets.PERF_E2E_GOOGLE_SERVICES }}
FTL_RESULTS_BUCKET: fireescape
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
environment: [ prod, autopush ]
steps:
- name: Checkout firebase-android-sdk
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: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.12'
pip-version: '26.0.1'
- name: Set up fireci
run: pip3 install -e ci/fireci
- uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3.0.1
- name: Add google-services.json
run: echo $PERF_E2E_GOOGLE_SERVICES | base64 -d > google-services.json
- name: Run fireperf end-to-end tests
run: |
fireci fireperf_e2e_test \
--target_environment=${{ matrix.environment }}
- name: Notify developers upon failures
if: ${{ failure() }}
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
const commit = context.sha;
const run = context.runId;
const url = `https://github.com/${owner}/${repo}/actions/runs/${run}`;
const datetime = (new Date()).toLocaleString('en-US', {
timeZone: 'America/Los_Angeles',
dateStyle: 'medium',
timeStyle: 'long',
});
const text =
`Failed on commit ${commit} at ${datetime}.
${url}`;
const { data: issues } = await github.rest.issues.listForRepo({
owner: owner,
repo: repo,
state: 'open',
labels: 'fireperf-e2e-tests'
});
if (issues.length) {
github.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: issues[0].number,
body: text,
});
} else {
github.rest.issues.create({
owner: owner,
repo: repo,
title: 'FirePerf E2E Test Failures',
body: text,
labels: ['fireperf-e2e-tests'],
assignees: ['raymondlam', 'visumickey']
});
}
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: test-artifacts (${{ matrix.environment }})
path: |
~/.m2/repository/com/google/firebase/perf-plugin
**/build/reports
**/build/test-results