chore: fix e2e tests and enable on CI #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: e2e | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
paths-ignore: | |
- "docs/**" | |
- "**/example/**" | |
- "**.md" | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "docs/**" | |
- "**/example/**" | |
- "**.md" | |
jobs: | |
android: | |
runs-on: macos-13 | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 | |
name: Install Node.js 16 | |
with: | |
node-version: "16" | |
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 | |
with: | |
distribution: "temurin" | |
java-version: "11" | |
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 | |
name: Gradle Cache | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-v4-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: ${{ runner.os }}-gradle-v4 | |
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 | |
name: AVD Cache | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd | |
- name: Firebase Emulator Cache | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 | |
with: | |
path: ~/.cache/firebase/emulators | |
key: firebase-emulators-v2-${{ github.run_id }} | |
restore-keys: firebase-emulators-v2 | |
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | |
with: | |
channel: "stable" | |
cache: true | |
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a | |
with: | |
run-bootstrap: false | |
melos-version: "3.0.1" | |
- name: "Bootstrap package" | |
run: melos bootstrap --scope tests | |
- name: "Install Tools" | |
run: | | |
sudo npm i -g firebase-tools | |
- name: Start Firebase Emulator | |
working-directory: tests | |
run: firebase emulators:start & | |
- name: Start emulator proxy | |
working-directory: emulator_proxy | |
run: dart run emulator_proxy:start & | |
- name: Create and start emulator | |
working-directory: .github/workflows/scripts | |
run: start-android-emulator.sh | |
- name: "E2E Tests" | |
working-directory: tests | |
run: flutter test integration_test/firebase_ui_test.dart --dart-define=CI=true | |
ios: | |
# Dropped down to macos-12 as macos-13 was timing out. This suspected issue:https://github.com/actions/runner-images/issues/8023 | |
runs-on: macos-12 | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 | |
name: Install Node.js 16 | |
with: | |
node-version: "16" | |
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 | |
with: | |
distribution: "temurin" | |
java-version: "11" | |
- uses: hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e | |
name: Xcode Compile Cache | |
with: | |
key: ${{ runner.os }}-ios-v3 | |
max-size: 700M | |
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 | |
name: Pods Cache | |
id: pods-cache | |
with: | |
path: tests/ios/Pods | |
key: ${{ runner.os }}-pods-v3-${{ hashFiles('tests/ios/Podfile.lock') }} | |
restore-keys: ${{ runner.os }}-ios-pods-v2 | |
- name: Firebase Emulator Cache | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 | |
with: | |
path: ~/.cache/firebase/emulators | |
key: firebase-emulators-v1-${{ github.run_id }} | |
restore-keys: firebase-emulators-v1 | |
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | |
with: | |
channel: "stable" | |
cache: true | |
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a | |
with: | |
run-bootstrap: false | |
melos-version: "3.0.1" | |
- name: "Bootstrap package" | |
run: melos bootstrap --scope tests | |
- name: "Install Tools" | |
run: | | |
sudo npm i -g firebase-tools | |
- name: "Build Application" | |
working-directory: tests | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
export CCACHE_SLOPPINESS=clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros | |
export CCACHE_FILECLONE=true | |
export CCACHE_DEPEND=true | |
export CCACHE_INODECACHE=true | |
ccache -s | |
flutter build ios --no-codesign --simulator --debug --target=./integration_test/firebase_ui_test.dart --dart-define=CI=true | |
ccache -s | |
- name: Start Firebase Emulator and proxy | |
run: | | |
cd ./tests | |
echo "Starting Firebase Emulator" | |
firebase emulators:start & | |
cd ../emulator_proxy | |
echo "Starting emulator proxy" | |
dart run emulator_proxy:start & | |
- name: "E2E Tests" | |
working-directory: tests | |
run: | | |
# Boot simulator and wait for System app to be ready. | |
# List of available simulators: https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#installed-simulators | |
SIMULATOR="iPhone 14" | |
xcrun simctl bootstatus "$SIMULATOR" -b | |
xcrun simctl logverbose "$SIMULATOR" enable | |
# Sleep to allow simulator to settle. | |
sleep 15 | |
# Uncomment following line to have simulator logs printed out for debugging purposes. | |
# xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' & | |
flutter test ./integration_test/firebase_ui_test.dart -d "$SIMULATOR" --dart-define=CI=true | |
macos: | |
runs-on: macos-13 | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 | |
name: Install Node.js 16 | |
with: | |
node-version: "16" | |
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 | |
with: | |
distribution: "temurin" | |
java-version: "11" | |
- uses: hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e | |
name: Xcode Compile Cache | |
with: | |
key: ${{ runner.os }}-macos-v2 | |
max-size: 700M | |
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 | |
name: Pods Cache | |
id: pods-cache | |
with: | |
path: tests/macos/Pods | |
key: ${{ runner.os }}-pods-v2-${{ hashFiles('tests/macos/Podfile.lock') }} | |
restore-keys: ${{ runner.os }}-macos-pods-v1 | |
- name: Cache Firebase Emulator | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 | |
with: | |
path: ~/.cache/firebase/emulators | |
key: firebase-emulators-v1-${{ github.run_id }} | |
restore-keys: firebase-emulators-v1 | |
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | |
with: | |
channel: "stable" | |
cache: true | |
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a | |
with: | |
run-bootstrap: false | |
melos-version: "3.0.1" | |
- name: "Bootstrap package" | |
run: melos bootstrap --scope tests | |
- name: "Install Tools" | |
run: | | |
sudo npm i -g firebase-tools | |
- name: "Build Application" | |
working-directory: tests | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
export CCACHE_SLOPPINESS=clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros | |
export CCACHE_FILECLONE=true | |
export CCACHE_DEPEND=true | |
export CCACHE_INODECACHE=true | |
ccache -s | |
flutter build macos --debug --target=./integration_test/firebase_ui_test.dart --device-id=macos --dart-define=CI=true | |
ccache -s | |
- name: Start Firebase Emulator and proxy | |
run: | | |
cd ./tests | |
echo "Starting Firebase Emulator" | |
firebase emulators:start & | |
cd ../emulator_proxy | |
echo "Starting emulator proxy" | |
dart run emulator_proxy:start & | |
- name: "E2E Tests" | |
working-directory: tests | |
run: flutter test ./integration_test/firebase_ui_test.dart -d macos --dart-define=CI=true |