Skip to content

Commit 0b97a24

Browse files
authored
Enable cron job schedule for Firebase Performance tests on private repository (#6034)
1 parent dea7109 commit 0b97a24

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Merge the yml file to master branch for the cron job schedule to be effective.
2+
# Reference: https://github.community/t/on-schedule-per-branch/17525
3+
name: performance-integration-tests
4+
5+
on:
6+
# See cron syntax references:
7+
# - https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
8+
# - https://crontab.guru/
9+
schedule:
10+
# Runs every 1 hours.
11+
# TODO: Revert job run frequency back to 4 hours after validation.
12+
# TODO: Validate when the timer starts after job is triggered.
13+
- cron: '0 */1 * * *'
14+
15+
jobs:
16+
17+
# Build and run the Integration Tests for the Firebase performance E2E Test App.
18+
performance-integration-tests:
19+
# Firebase Performance lives in private repository only currently.
20+
# Remove the check after Firebase Performance is open sourced.
21+
if: github.repository == 'FirebasePrivate/firebase-ios-sdk'
22+
runs-on: macos-latest
23+
steps:
24+
- uses: actions/checkout@v2
25+
with:
26+
ref: perf
27+
- name: Setup Bundler
28+
run: scripts/setup_bundler.sh
29+
- name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
30+
run: scripts/third_party/travis/retry.sh scripts/build.sh Performance all integration

.github/workflows/performance.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Merge the yml file to master branch for the cron job schedule to be effective.
2+
# Reference: https://github.community/t/on-schedule-per-branch/17525
3+
name: performance
4+
5+
on:
6+
pull_request:
7+
paths:
8+
# Performance sources
9+
- 'FirebasePerformance/**'
10+
# Podspec
11+
- 'FirebasePerformance.podspec'
12+
# YML configuration file
13+
- '.github/workflows/performance.yml'
14+
# Rebuild on Ruby infrastructure changes
15+
- 'Gemfile'
16+
schedule:
17+
# Run every day at 3am (PST) - cron uses UTC times
18+
# This is set to 3 hours after zip workflow so zip testing can run after.
19+
# Specified in format 'minutes hours day month dayofweek'
20+
- cron: '0 11 * * *'
21+
22+
jobs:
23+
24+
# Build and run the unit tests for Firebase performance SDK.
25+
performance:
26+
# Firebase Performance lives in private repository only currently.
27+
# Remove the check after Firebase Performance is open sourced.
28+
if: github.repository == 'FirebasePrivate/firebase-ios-sdk'
29+
runs-on: macos-latest
30+
steps:
31+
- uses: actions/checkout@v2
32+
with:
33+
ref: perf
34+
- name: Setup Bundler
35+
run: scripts/setup_bundler.sh
36+
- name: BuildAndTest # can be replaced with pod lib lint with CocoaPods 1.10
37+
run: scripts/third_party/travis/retry.sh scripts/build.sh Performance all xcodebuild
38+
39+
# Podspec lint check for Firebase Performance
40+
pod-lib-lint:
41+
# Firebase Performance lives in private repository only currently.
42+
# Remove the check after Firebase Performance is open sourced.
43+
if: github.repository == 'FirebasePrivate/firebase-ios-sdk'
44+
runs-on: macOS-latest
45+
46+
strategy:
47+
matrix:
48+
target: [ios]
49+
steps:
50+
- uses: actions/checkout@v2
51+
with:
52+
ref: perf
53+
- name: Setup Bundler
54+
run: scripts/setup_bundler.sh
55+
- name: Build
56+
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebasePerformance.podspec --skip-tests --platforms=${{ matrix.target }}

0 commit comments

Comments
 (0)