Skip to content

FirePerf E2E Tests #6051

FirePerf E2E Tests

FirePerf E2E Tests #6051

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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Checkout firebase-android-buildtools
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: FirebasePrivate/firebase-android-buildtools
token: ${{ secrets.GOOGLE_OSS_BOT_TOKEN }}
path: firebase-android-buildtools
- name: Set up JDK 17
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Set up Python 3.10
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: '3.10'
- name: Set up fireci
run: pip3 install -e ci/fireci
- uses: google-github-actions/auth@71f986410dfbc7added4569d411d040a91dc6935 # v2.1.8
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- uses: google-github-actions/setup-gcloud@77e7a554d41e2ee56fc945c52dfd3f33d12def9a # v2.1.4
- 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 \
--plugin_repo_dir=firebase-android-buildtools \
--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