Skip to content

Commit

Permalink
ci: move to macOS 13 runner (#10841)
Browse files Browse the repository at this point in the history
* ci: move to macOS 13 XL runner

* ci: update iOS simulator

* ci: update iOS simulator

* ci: move firebase_performance to main tests

* ci: move firebase_performance to main tests

* ci: update flutter version for macos

* ci: update flutter version for macos

* ci: tests

* ci: tests

* ci: tests

* ci: tests

* ci: tests

* ci: tests

* ci: tests

* ci: tests

* ci: tests

* ci: tests

* ci: tests

* ci: tests

* ci: tests

* ci: tests

* ci: tests

* ci: final

* ci: manual android emulator

* ci: manual android emulator

* ci: manual android emulator

* ci: fix android notification request and cloud firestore package name

* ci: fix android notification request and cloud firestore package name

* ci: fix android notification request and cloud firestore package name

* ci: fix android notification request and cloud firestore package name

* ci: fix android notification request and cloud firestore package name

* ci: fix android notification request and cloud firestore package name
  • Loading branch information
Lyokone authored Apr 27, 2023
1 parent 0ac13b6 commit 3cfce63
Show file tree
Hide file tree
Showing 40 changed files with 237 additions and 495 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/all_plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
cache: true
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a
with:
melos-version: '3.0.0-dev.0'
melos-version: '3.0.1'
- name: 'Run Analyze'
run: melos run analyze

Expand All @@ -48,7 +48,7 @@ jobs:
cache: true
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a
with:
melos-version: '3.0.0-dev.0'
melos-version: '3.0.1'
- name: 'Pub Check'
run: |
melos exec -c 1 --no-private --ignore="*example*" -- \
Expand All @@ -65,7 +65,7 @@ jobs:
cache: true
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a
with:
melos-version: '3.0.0-dev.0'
melos-version: '3.0.1'
- name: 'Flutter Pub Get'
run: |
melos exec -c 1 --scope="*example*" -- \
Expand All @@ -82,7 +82,7 @@ jobs:
cache: true
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a
with:
melos-version: '3.0.0-dev.0'
melos-version: '3.0.1'
- uses: Homebrew/actions/setup-homebrew@master
- name: 'Install Tools'
run: |
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
cache: true
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a
with:
melos-version: '3.0.0-dev.0'
melos-version: '3.0.1'
- name: 'Build Examples'
run: |
melos exec -c 1 --scope="*example*" --dir-exists="web" -- \
Expand All @@ -132,7 +132,7 @@ jobs:
cache: true
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a
with:
melos-version: '3.0.0-dev.0'
melos-version: '3.0.1'
- name: 'Flutter Test'
run: melos run test --no-select
- name: 'Flutter Test - Web'
Expand All @@ -157,6 +157,6 @@ jobs:
# Running `melos bootstrap` is not needed because we use Melos just
# for the `check-license-header` script.
run-bootstrap: false
melos-version: '3.0.0-dev.0'
melos-version: '3.0.1'
- name: Check license header
run: melos run check-license-header
98 changes: 46 additions & 52 deletions .github/workflows/e2e_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ on:

jobs:
android:
runs-on: macos-12
runs-on: macos-13
timeout-minutes: 45
strategy:
matrix:
working_directory: ['tests', 'packages/cloud_firestore/cloud_firestore/example']
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
Expand All @@ -45,21 +48,13 @@ jobs:
key: ${{ runner.os }}-gradle-v2-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-gradle-v2
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
name: AVD Cache
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd
- name: Generate AVD snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0
with:
api-level: 30
arch: x86_64
target: google_apis
profile: Nexus 5X
script: echo "Generated AVD snapshot for caching"
- name: Firebase Emulator Cache
uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
with:
Expand All @@ -73,47 +68,40 @@ jobs:
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a
with:
run-bootstrap: false
melos-version: '3.0.0-dev.0'
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: |
flutter build apk --debug --target=./integration_test/e2e_test.dart --dart-define=CI=true --no-android-gradle-daemon
- name: Start Firebase Emulator
run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh
- name: "E2E Tests"
uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0
timeout-minutes: 30
with:
api-level: 30
arch: x86_64
target: google_apis
profile: Nexus 5X
working-directory: tests
script: |
sleep 15
$ANDROID_HOME/platform-tools/adb logcat '*:D' > adb-log.txt &
flutter test integration_test/e2e_test.dart --dart-define=CI=true
- name: Compress Emulator Log
if: always()
run: cd tests/ && gzip -9 adb-log.txt
shell: bash

- name: Upload Emulator Log
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
if: always()
with:
name: ${{ matrix.api-level }}-${{ matrix.arch }}-${{matrix.target}}-${{matrix.first-boot-delay}}-${{matrix.iteration}}-adb_logs
path: tests/adb-log.txt.gz
- name: Create and start emulator
# We use the installed SDK in the macOS image to create and start the emulator
run: |
echo "List installed packages"
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --list_installed
echo "Installing system image"
echo "y" | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;google_apis;x86_64"
echo "Creating AVD"
echo "no" | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/avdmanager create avd -n test_emulator -k "system-images;android-33;google_apis;x86_64" --force
echo "Starting emulator"
$ANDROID_SDK_ROOT/emulator/emulator -avd test_emulator -no-audio -no-boot-anim -no-window &
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'
- name: "E2E Tests"
working-directory: ${{ matrix.working_directory }}
run: |
flutter test integration_test/e2e_test.dart --dart-define=CI=true
ios:
runs-on: macos-12
runs-on: macos-13
timeout-minutes: 45
strategy:
matrix:
working_directory: ['tests', 'packages/cloud_firestore/cloud_firestore/example']
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
Expand Down Expand Up @@ -149,14 +137,14 @@ jobs:
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a
with:
run-bootstrap: false
melos-version: '3.0.0-dev.0'
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
working-directory: ${{ matrix.working_directory }}
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
Expand All @@ -169,10 +157,11 @@ jobs:
- name: Start Firebase Emulator
run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh
- name: "E2E Tests"
working-directory: tests
working-directory: ${{ matrix.working_directory }}
run: |
# Boot simulator and wait for System app to be ready.
SIMULATOR="iPhone 11"
# 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.
Expand All @@ -185,8 +174,11 @@ jobs:
exit $FLUTTER_DRIVE_EXIT_CODE
macos:
runs-on: macos-12
runs-on: macos-13
timeout-minutes: 45
strategy:
matrix:
working_directory: ['tests', 'packages/cloud_firestore/cloud_firestore/example']
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
Expand Down Expand Up @@ -217,20 +209,19 @@ jobs:
restore-keys: firebase-emulators-v1
- uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d
with:
# TODO(Lyokone): upgrade to stable when https://github.com/flutter/flutter/issues/118469 is closed
flutter-version: '3.3.10'
channel: 'stable'
cache: true
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a
with:
run-bootstrap: false
melos-version: '3.0.0-dev.0'
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
working-directory: ${{ matrix.working_directory }}
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
Expand All @@ -243,7 +234,7 @@ jobs:
- name: Start Firebase Emulator
run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh
- name: "E2E Tests"
working-directory: tests
working-directory: ${{ matrix.working_directory }}
run: |
flutter test \
integration_test/e2e_test.dart \
Expand All @@ -253,6 +244,9 @@ jobs:
web:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
working_directory: ['tests', 'packages/cloud_firestore/cloud_firestore/example']
steps:
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
Expand All @@ -270,7 +264,7 @@ jobs:
- uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a
with:
run-bootstrap: false
melos-version: '3.0.0-dev.0'
melos-version: '3.0.1'
- name: "Bootstrap package"
run: melos bootstrap --scope tests
- name: "Install Tools"
Expand All @@ -285,7 +279,7 @@ jobs:
- name: Start Firebase Emulator
run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh
- name: "E2E Tests"
working-directory: tests
working-directory: ${{ matrix.working_directory }}
# Web devices are not supported for the `flutter test` command yet. As a
# workaround we can use the `flutter drive` command. Tracking issue:
# https://github.com/flutter/flutter/issues/66264
Expand Down
123 changes: 0 additions & 123 deletions .github/workflows/firebase_firestore.yaml

This file was deleted.

Loading

0 comments on commit 3cfce63

Please sign in to comment.