chore(deps): bump dorny/paths-filter from 3.0.3 to 4.0.3 (#18744) #386
This file contains hidden or 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-smoke | |
| # The `tests` app depends on every plugin in the repository at once. Its job is | |
| # to prove they still build and boot together, so unlike the per-package e2e | |
| # workflows this one is deliberately NOT path-scoped to a package: a change to | |
| # any plugin can break the combined app. | |
| # | |
| # It is still scoped by *platform*, via reusable_repo_changes.yaml: an | |
| # Android-only change anywhere in the repo runs the android jobs and skips the | |
| # four platforms it cannot affect. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-smoke | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - 'docs/**' | |
| - 'website/**' | |
| - '**/example/**' | |
| - '!**/example/integration_test/**' | |
| - '**/flutterfire_ui/**' | |
| - '**.md' | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - 'docs/**' | |
| - 'website/**' | |
| - '**/example/**' | |
| - '!**/example/integration_test/**' | |
| - '**/flutterfire_ui/**' | |
| - '**.md' | |
| workflow_call: | |
| inputs: | |
| nightly_test_mode: | |
| type: boolean | |
| default: false | |
| jobs: | |
| changes: | |
| uses: ./.github/workflows/reusable_repo_changes.yaml | |
| with: | |
| app-path: 'tests' | |
| android: | |
| needs: changes | |
| if: needs.changes.outputs.android == 'true' | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| timeout-minutes: ${{ inputs.nightly_test_mode && 5 || 25 }} | |
| env: | |
| AVD_ARCH: x86_64 | |
| AVD_API_LEVEL: 34 | |
| AVD_TARGET: google_apis | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - uses: ./.github/actions/setup-flutterfire | |
| with: | |
| firebase-tools-version: '15.25.1' | |
| bootstrap-scope: tests | |
| - name: Firebase Emulator Cache | |
| id: firebase-emulator-cache | |
| uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| continue-on-error: true | |
| with: | |
| # The firebase emulators are pure javascript and java, OS-independent | |
| enableCrossOsArchive: true | |
| # Must match the save path exactly | |
| path: ~/.cache/firebase/emulators | |
| key: firebase-emulators-v5-${{ env.FIREBASE_TOOLS_VERSION }} | |
| # Trailing dash so this never prefix-matches a future version's key | |
| restore-keys: firebase-emulators-v5- | |
| - name: Generate dummy Firebase configs | |
| run: dart ./.github/workflows/scripts/generate-dummy-firebase-configs.dart | |
| - name: Install Cloud Functions dependencies | |
| # `firebase emulators:exec` does not install these itself (the old | |
| # start-firebase-emulator.sh wrapper did); without them the functions | |
| # emulator fails to load the function definitions. | |
| run: npm ci --prefix .github/workflows/scripts/functions | |
| - name: Enable KVM | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Gradle cache | |
| uses: gradle/actions/setup-gradle@90ddb51e90a5fd9ba75f40cf85156b7b41bf76a3 | |
| - name: Prepare AVD home on /mnt | |
| # GitHub-hosted runners mount a ~74GB volume at /mnt. Create it before AVD cache | |
| # restore and android-emulator-runner (avdmanager needs the space at create time). | |
| run: | | |
| sudo mkdir -p /mnt/avd | |
| sudo chown "$USER:$USER" /mnt/avd | |
| df -h / /mnt | |
| - name: AVD cache | |
| uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| continue-on-error: true | |
| id: avd-cache | |
| with: | |
| # Must match the save path exactly | |
| path: | | |
| /mnt/avd/* | |
| ~/.android/adb* | |
| # The emulator build is part of the key so bumping `emulator-build:` below | |
| # invalidates the cached AVD instead of reusing an image from the old build. | |
| key: avd-${{ runner.os }}-${{ env.AVD_API_LEVEL }}-${{ env.AVD_TARGET }}-${{ env.AVD_ARCH }}-14214601 | |
| - name: Link AVD home to /mnt | |
| # android-emulator-runner exportVariables ANDROID_AVD_HOME to $HOME/.android/avd | |
| run: | | |
| mkdir -p "$HOME/.android" | |
| rm -rf "$HOME/.android/avd" | |
| ln -s /mnt/avd "$HOME/.android/avd" | |
| - name: Pre-build APK | |
| # Build outside the emulator so the AVD does not boot and idle through the | |
| # whole Gradle build. `flutter test` below reuses this warm build cache. | |
| # The validation skip matches `flutter test`, which does not enforce the | |
| # minimum Gradle version either. | |
| working-directory: tests | |
| timeout-minutes: 25 | |
| run: flutter build apk --debug --target=integration_test/core_shard_test.dart --android-skip-build-dependency-validation | |
| - name: Start AVD then run E2E tests | |
| uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d | |
| # Two alarm-bounded test attempts (see the retry script) plus AVD boot | |
| # and the emulator suite; a single launch hang used to burn the whole | |
| # 20-minute budget. | |
| timeout-minutes: 40 | |
| env: | |
| ANDROID_AVD_HOME: /mnt/avd | |
| STORAGE_EMULATOR_DEBUG: 'true' | |
| TEST_TARGET: integration_test/core_shard_test.dart | |
| with: | |
| api-level: ${{ env.AVD_API_LEVEL }} | |
| target: ${{ env.AVD_TARGET }} | |
| arch: ${{ env.AVD_ARCH }} | |
| emulator-build: 14214601 | |
| # The default (true) wipes and recreates the AVD, making the cache above useless. | |
| force-avd-creation: false | |
| # firebase.json and the emulator rule files live here, so `emulators:exec` | |
| # has to run from this directory; the test command cds back to the | |
| # package under test. | |
| working-directory: .github/workflows/scripts | |
| # `emulators:exec` owns the emulator lifecycle: it boots the suite, runs | |
| # the command and tears the suite down, exiting with the command's exit | |
| # code. Nothing is left running between steps. | |
| script: | | |
| firebase emulators:exec --project flutterfire-e2e-tests "cd ${GITHUB_WORKSPACE}/tests && ${GITHUB_WORKSPACE}/.github/workflows/scripts/flutter-test-android-retry.sh" | |
| - name: Ensure Appium is shut down | |
| # Required because of below issue where emulator failing to shut down properly causes tests to fail | |
| # https://github.com/ReactiveCircus/android-emulator-runner/issues/385 | |
| run: | | |
| pgrep -f appium && pkill -f appium || echo "No Appium process found" | |
| - name: Save Firestore Emulator Cache | |
| # Branches can read main cache but main cannot read branch cache. Avoid LRU eviction with main-only cache. | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| continue-on-error: true | |
| with: | |
| # The firebase emulators are pure javascript and java, OS-independent | |
| enableCrossOsArchive: true | |
| key: ${{ steps.firebase-emulator-cache.outputs.cache-primary-key }} | |
| # Must match the restore path exactly | |
| path: ~/.cache/firebase/emulators | |
| - name: Save Android Emulator Cache | |
| # Branches can read main cache but main cannot read branch cache. Avoid LRU eviction with main-only cache. | |
| # Skip on a cache hit: the AVD image is multi-GB and re-uploading it unchanged on | |
| # every main run is pure waste. | |
| if: github.ref == 'refs/heads/main' && steps.avd-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| continue-on-error: true | |
| with: | |
| key: ${{ steps.avd-cache.outputs.cache-primary-key }} | |
| # Must match the restore path exactly | |
| path: | | |
| /mnt/avd/* | |
| ~/.android/adb* | |
| agp9-compatibility: | |
| needs: changes | |
| if: needs.changes.outputs.android == 'true' | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - uses: ./.github/actions/setup-flutterfire | |
| with: | |
| node: 'false' | |
| bootstrap-scope: 'tests' | |
| - name: Gradle cache | |
| uses: gradle/actions/setup-gradle@90ddb51e90a5fd9ba75f40cf85156b7b41bf76a3 | |
| - name: 'Build tests app with AGP 9' | |
| timeout-minutes: 25 | |
| run: bash ./.github/workflows/scripts/agp9-compatibility.sh | |
| ios: | |
| needs: changes | |
| if: needs.changes.outputs.ios == 'true' | |
| permissions: | |
| contents: read | |
| runs-on: xcode-27 | |
| timeout-minutes: ${{ inputs.nightly_test_mode && 5 || 35 }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - uses: ./.github/actions/setup-flutterfire | |
| with: | |
| firebase-tools-version: '15.25.1' | |
| bootstrap-scope: tests | |
| - name: Disable Swift Package Manager | |
| # Recent stable Flutter enables SPM by default; the smoke app's Apple | |
| # builds are CocoaPods by design (tests/ios, tests/macos Podfiles). | |
| run: flutter config --no-enable-swift-package-manager | |
| - uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d | |
| name: Xcode Compile Cache | |
| with: | |
| # Distinct from the macOS job's key: both run on xcode-27, so a shared | |
| # `xcode-cache-${{ runner.os }}` had the two jobs clobbering each other. | |
| key: xcode-ccache-ios-xcode27 | |
| save: "${{ github.ref == 'refs/heads/main' }}" | |
| max-size: 700M | |
| - uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| continue-on-error: true | |
| name: Pods Cache | |
| id: pods-cache | |
| with: | |
| # Must match the save path exactly | |
| path: tests/ios/Pods | |
| # Keyed on the Podfile and the pinned Firebase SDK version, not tests/pubspec.lock: | |
| # that file is gitignored, so hashFiles() returned an empty string and the key | |
| # never changed - the cache could never be invalidated. | |
| key: pods-v5-${{ runner.os }}-ios-${{ hashFiles('tests/ios/Podfile', 'packages/firebase_core/firebase_core/ios/firebase_sdk_version.rb') }} | |
| restore-keys: pods-v5-${{ runner.os }}-ios- | |
| - name: Firebase Emulator Cache | |
| id: firebase-emulator-cache | |
| uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| continue-on-error: true | |
| with: | |
| # The firebase emulators are pure javascript and java, OS-independent | |
| enableCrossOsArchive: true | |
| # Must match the save path exactly | |
| path: ~/.cache/firebase/emulators | |
| key: firebase-emulators-v5-${{ env.FIREBASE_TOOLS_VERSION }} | |
| # Trailing dash so this never prefix-matches a future version's key | |
| restore-keys: firebase-emulators-v5- | |
| - name: Generate dummy Firebase configs | |
| run: dart ./.github/workflows/scripts/generate-dummy-firebase-configs.dart | |
| - name: 'Build Application' | |
| working-directory: tests | |
| timeout-minutes: 25 | |
| 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/core_shard_test.dart --dart-define=CI=true | |
| ccache -s | |
| - name: Install Cloud Functions dependencies | |
| # `firebase emulators:exec` does not install these itself (the old | |
| # start-firebase-emulator.sh wrapper did); without them the functions | |
| # emulator fails to load the function definitions. | |
| # Chown the npm cache directory to the runner user to avoid permission issues. | |
| run: sudo chown -R 501:20 "/Users/runner/.npm" && npm ci --prefix .github/workflows/scripts/functions | |
| - uses: futureware-tech/simulator-action@e89aa8f93d3aec35083ff49d2854d07f7186f7f5 | |
| id: simulator | |
| with: | |
| # List of available simulators: https://github.com/actions/runner-images/blob/main/images/macos/xcode-27-arm64-Readme.md#installed-simulators | |
| model: "iPhone 17" | |
| - name: Ensure Simulator Ready | |
| timeout-minutes: 13 | |
| env: | |
| SIMULATOR: ${{ steps.simulator.outputs.udid }} | |
| ENSURE_BOOT_IF_NEEDED: "0" | |
| run: .github/workflows/scripts/ensure-simulator-ready.sh | |
| - name: 'E2E Tests' | |
| # firebase.json and the emulator rule files live here, so `emulators:exec` | |
| # has to run from this directory; the test command cds back to the package | |
| # under test. | |
| working-directory: ./.github/workflows/scripts | |
| # Covers booting the emulator suite as well as the tests themselves, since | |
| # `emulators:exec` now owns both. | |
| timeout-minutes: 20 | |
| env: | |
| SIMULATOR: ${{ steps.simulator.outputs.udid }} | |
| STORAGE_EMULATOR_DEBUG: 'true' | |
| run: | | |
| # Uncomment following line to have simulator logs printed out for debugging purposes. | |
| # xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' & | |
| # Once the integration test runner has launched, leave it running rather | |
| # than starting a second app instance from a retry. | |
| # `emulators:exec` boots the suite, runs the command and tears the suite | |
| # down, exiting with the command's exit code. | |
| firebase emulators:exec --project flutterfire-e2e-tests "cd ${GITHUB_WORKSPACE}/tests && flutter test integration_test/core_shard_test.dart -d \"$SIMULATOR\" --timeout 10x --dart-define=CI=true" | |
| - name: Save Firestore Emulator Cache | |
| # Branches can read main cache but main cannot read branch cache. Avoid LRU eviction with main-only cache. | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| continue-on-error: true | |
| with: | |
| # The firebase emulators are pure javascript and java, OS-independent | |
| enableCrossOsArchive: true | |
| key: ${{ steps.firebase-emulator-cache.outputs.cache-primary-key }} | |
| # Must match the restore paths exactly | |
| path: ~/.cache/firebase/emulators | |
| - name: Save Pods Cache | |
| # Branches can read main cache but main cannot read branch cache. Avoid LRU eviction with main-only cache. | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| continue-on-error: true | |
| with: | |
| key: ${{ steps.pods-cache.outputs.cache-primary-key }} | |
| # Must match the restore paths exactly | |
| path: tests/ios/Pods | |
| macos: | |
| needs: changes | |
| if: needs.changes.outputs.macos == 'true' | |
| permissions: | |
| contents: read | |
| runs-on: xcode-27 | |
| timeout-minutes: ${{ inputs.nightly_test_mode && 5 || 35 }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - uses: ./.github/actions/setup-flutterfire | |
| with: | |
| firebase-tools-version: '15.25.1' | |
| bootstrap-scope: tests | |
| - name: Disable Swift Package Manager | |
| # Recent stable Flutter enables SPM by default; the smoke app's Apple | |
| # builds are CocoaPods by design (tests/ios, tests/macos Podfiles). | |
| run: flutter config --no-enable-swift-package-manager | |
| - uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d | |
| name: Xcode Compile Cache | |
| with: | |
| # Distinct from the iOS job's key: both run on xcode-27, so a shared | |
| # `xcode-cache-${{ runner.os }}` had the two jobs clobbering each other. | |
| key: xcode-ccache-macos-xcode27 | |
| save: "${{ github.ref == 'refs/heads/main' }}" | |
| max-size: 700M | |
| - name: Pods Cache | |
| continue-on-error: true | |
| uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| id: pods-cache | |
| with: | |
| # Must match the save path exactly | |
| path: tests/macos/Pods | |
| # Keyed on the Podfile and the pinned Firebase SDK version, not tests/pubspec.lock: | |
| # that file is gitignored, so hashFiles() returned an empty string and the key | |
| # never changed - the cache could never be invalidated. | |
| key: pods-v5-${{ runner.os }}-macos-${{ hashFiles('tests/macos/Podfile', 'packages/firebase_core/firebase_core/ios/firebase_sdk_version.rb') }} | |
| restore-keys: pods-v5-${{ runner.os }}-macos- | |
| - name: Firebase Emulator Cache | |
| id: firebase-emulator-cache | |
| uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| continue-on-error: true | |
| with: | |
| # The firebase emulators are pure javascript and java, OS-independent | |
| enableCrossOsArchive: true | |
| # Must match the save path exactly | |
| path: ~/.cache/firebase/emulators | |
| key: firebase-emulators-v5-${{ env.FIREBASE_TOOLS_VERSION }} | |
| # Trailing dash so this never prefix-matches a future version's key | |
| restore-keys: firebase-emulators-v5- | |
| - name: Generate dummy Firebase configs | |
| run: dart ./.github/workflows/scripts/generate-dummy-firebase-configs.dart | |
| - name: 'Build Application' | |
| working-directory: tests | |
| timeout-minutes: 25 | |
| 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/core_shard_test.dart --device-id=macos --dart-define=CI=true | |
| ccache -s | |
| - name: Install Cloud Functions dependencies | |
| # `firebase emulators:exec` does not install these itself (the old | |
| # start-firebase-emulator.sh wrapper did); without them the functions | |
| # emulator fails to load the function definitions. | |
| # Chown the npm cache directory to the runner user to avoid permission issues. | |
| run: sudo chown -R 501:20 "/Users/runner/.npm" && npm ci --prefix .github/workflows/scripts/functions | |
| - name: 'E2E Tests' | |
| # firebase.json and the emulator rule files live here, so `emulators:exec` | |
| # has to run from this directory; the test command cds back to the package | |
| # under test. | |
| working-directory: ./.github/workflows/scripts | |
| # Covers booting the emulator suite as well as the tests themselves, since | |
| # `emulators:exec` now owns both. | |
| timeout-minutes: 20 | |
| env: | |
| STORAGE_EMULATOR_DEBUG: 'true' | |
| run: | | |
| # The test command is handed to `emulators:exec` as a single string; a | |
| # quoted heredoc keeps the script below verbatim instead of forcing a | |
| # layer of quote escaping onto it. | |
| TEST_COMMAND=$(cat <<'EOF' | |
| cd "${GITHUB_WORKSPACE}/tests" | |
| # flutter test on macOS CI may exit 1 due to "Failed to foreground app" | |
| # even when all tests pass. Check actual test results to determine success. | |
| set +e | |
| OUTPUT=$(flutter test \ | |
| integration_test/core_shard_test.dart \ | |
| -d macos \ | |
| --dart-define=CI=true \ | |
| --timeout 10x 2>&1) | |
| EXIT_CODE=$? | |
| echo "$OUTPUT" | |
| if [ $EXIT_CODE -ne 0 ]; then | |
| if echo "$OUTPUT" | grep -q "Some tests failed" || echo "$OUTPUT" | grep -q "test failed"; then | |
| exit 1 | |
| fi | |
| if echo "$OUTPUT" | grep -q "tests passed"; then | |
| echo "All tests passed but flutter test exited with $EXIT_CODE (likely 'Failed to foreground app'). Treating as success." | |
| exit 0 | |
| fi | |
| exit $EXIT_CODE | |
| fi | |
| EOF | |
| ) | |
| # `emulators:exec` boots the suite, runs the command and tears the suite | |
| # down, exiting with the command's exit code - so the laundering above | |
| # still decides whether this step passes. | |
| firebase emulators:exec --project flutterfire-e2e-tests "$TEST_COMMAND" | |
| - name: Save Firestore Emulator Cache | |
| continue-on-error: true | |
| # Branches can read main cache but main cannot read branch cache. Avoid LRU eviction with main-only cache. | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| with: | |
| # The firebase emulators are pure javascript and java, OS-independent | |
| enableCrossOsArchive: true | |
| key: ${{ steps.firebase-emulator-cache.outputs.cache-primary-key }} | |
| # Must match the restore path exactly | |
| path: ~/.cache/firebase/emulators | |
| - name: Save Pods Cache | |
| continue-on-error: true | |
| # Branches can read main cache but main cannot read branch cache. Avoid LRU eviction with main-only cache. | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| with: | |
| key: ${{ steps.pods-cache.outputs.cache-primary-key }} | |
| # Must match the restore paths exactly | |
| path: tests/macos/Pods | |
| web: | |
| needs: changes | |
| if: needs.changes.outputs.web == 'true' | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| timeout-minutes: ${{ inputs.nightly_test_mode && 5 || 25 }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - uses: ./.github/actions/setup-flutterfire | |
| timeout-minutes: 15 | |
| with: | |
| firebase-tools-version: '15.25.1' | |
| bootstrap-scope: tests | |
| # The ubuntu runner image ships Google Chrome and a chromedriver build | |
| # that is matched to it — that pairing IS our pinning strategy, so we use | |
| # the image binaries rather than downloading our own. | |
| - name: 'Set up Chrome and chromedriver' | |
| run: | | |
| echo "$CHROMEWEBDRIVER" >> "$GITHUB_PATH" | |
| google-chrome --version | |
| "$CHROMEWEBDRIVER/chromedriver" --version | |
| - name: Generate dummy Firebase configs | |
| run: dart ./.github/workflows/scripts/generate-dummy-firebase-configs.dart | |
| - name: Firebase Emulator Cache | |
| id: firebase-emulator-cache | |
| uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| continue-on-error: true | |
| with: | |
| # The firebase emulators are pure javascript and java, OS-independent | |
| enableCrossOsArchive: true | |
| # Must match the save path exactly | |
| path: ~/.cache/firebase/emulators | |
| key: firebase-emulators-v5-${{ env.FIREBASE_TOOLS_VERSION }} | |
| restore-keys: firebase-emulators-v5- | |
| - name: Install Cloud Functions dependencies | |
| # `firebase emulators:exec` does not install these itself (the old | |
| # start-firebase-emulator.sh wrapper did); without them the functions | |
| # emulator fails to load the function definitions. | |
| run: npm ci --prefix .github/workflows/scripts/functions | |
| - name: 'E2E Tests' | |
| # Covers booting the emulator suite as well as the tests themselves, since | |
| # `emulators:exec` now owns both. | |
| timeout-minutes: 20 | |
| # firebase.json and the emulator rule files live here, so `emulators:exec` | |
| # has to run from this directory; the test command cds back to the package | |
| # under test. | |
| working-directory: ./.github/workflows/scripts | |
| # 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 | |
| # The retry script only retries infrastructure startup failures | |
| # (timeouts, AppConnectionException, "Failed to exit Chromium"); real | |
| # test/compile failures fail fast. It also owns the chromedriver | |
| # lifecycle, so nothing here starts chromedriver. | |
| # The retry script reads its FLUTTER_DRIVE_* configuration from the | |
| # environment, which `emulators:exec` passes through to the command. | |
| env: | |
| FLUTTER_DRIVE_TARGET: './integration_test/core_shard_test.dart' | |
| FLUTTER_DRIVE_DRIVER: './test_driver/integration_test.dart' | |
| FLUTTER_DRIVE_EXTRA_ARGS: '--dart-define=CI=true' | |
| STORAGE_EMULATOR_DEBUG: 'true' | |
| run: | | |
| firebase emulators:exec --project flutterfire-e2e-tests "cd ${GITHUB_WORKSPACE}/tests && ${GITHUB_WORKSPACE}/.github/workflows/scripts/flutter-drive-web-retry.sh" | |
| - name: Save Firestore Emulator Cache | |
| # Branches can read main cache but main cannot read branch cache. Avoid LRU eviction with main-only cache. | |
| if: github.ref == 'refs/heads/main' | |
| continue-on-error: true | |
| uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| with: | |
| # The firebase emulators are pure javascript and java, OS-independent | |
| enableCrossOsArchive: true | |
| key: ${{ steps.firebase-emulator-cache.outputs.cache-primary-key }} | |
| # Must match the restore path exactly | |
| path: ~/.cache/firebase/emulators | |
| web-wasm: | |
| needs: changes | |
| if: needs.changes.outputs.web == 'true' | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| timeout-minutes: ${{ inputs.nightly_test_mode && 5 || 25 }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - uses: ./.github/actions/setup-flutterfire | |
| timeout-minutes: 15 | |
| with: | |
| firebase-tools-version: '15.25.1' | |
| bootstrap-scope: tests | |
| # The ubuntu runner image ships Google Chrome and a chromedriver build | |
| # that is matched to it — that pairing IS our pinning strategy, so we use | |
| # the image binaries rather than downloading our own. | |
| - name: 'Set up Chrome and chromedriver' | |
| run: | | |
| echo "$CHROMEWEBDRIVER" >> "$GITHUB_PATH" | |
| google-chrome --version | |
| "$CHROMEWEBDRIVER/chromedriver" --version | |
| - name: Generate dummy Firebase configs | |
| run: dart ./.github/workflows/scripts/generate-dummy-firebase-configs.dart | |
| - name: Firebase Emulator Cache | |
| id: firebase-emulator-cache | |
| uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| continue-on-error: true | |
| with: | |
| # The firebase emulators are pure javascript and java, OS-independent | |
| enableCrossOsArchive: true | |
| # Must match the save path exactly | |
| path: ~/.cache/firebase/emulators | |
| key: firebase-emulators-v5-${{ env.FIREBASE_TOOLS_VERSION }} | |
| restore-keys: firebase-emulators-v5- | |
| - name: Install Cloud Functions dependencies | |
| # `firebase emulators:exec` does not install these itself (the old | |
| # start-firebase-emulator.sh wrapper did); without them the functions | |
| # emulator fails to load the function definitions. | |
| run: npm ci --prefix .github/workflows/scripts/functions | |
| - name: 'Use WASM index.html' | |
| working-directory: tests | |
| run: mv ./web/wasm_index.html ./web/index.html | |
| - name: 'E2E Tests' | |
| # Covers booting the emulator suite as well as the tests themselves, since | |
| # `emulators:exec` now owns both. | |
| timeout-minutes: 20 | |
| # firebase.json and the emulator rule files live here, so `emulators:exec` | |
| # has to run from this directory; the test command cds back to the package | |
| # under test. | |
| working-directory: ./.github/workflows/scripts | |
| # 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 | |
| # WASM web runs can hang after building but before the test harness | |
| # connects; the retry script retries only those infrastructure startup | |
| # failures. It also owns the chromedriver lifecycle, so nothing here | |
| # starts chromedriver. | |
| # The retry script reads its FLUTTER_DRIVE_* configuration from the | |
| # environment, which `emulators:exec` passes through to the command. | |
| env: | |
| FLUTTER_DRIVE_TARGET: './integration_test/core_shard_test.dart' | |
| FLUTTER_DRIVE_DRIVER: './test_driver/integration_test.dart' | |
| FLUTTER_DRIVE_EXTRA_ARGS: '--wasm --dart-define=CI=true' | |
| FLUTTER_DRIVE_TIMEOUT_SECONDS: '300' | |
| FLUTTER_DRIVE_MAX_ATTEMPTS: '2' | |
| STORAGE_EMULATOR_DEBUG: 'true' | |
| run: | | |
| firebase emulators:exec --project flutterfire-e2e-tests "cd ${GITHUB_WORKSPACE}/tests && ${GITHUB_WORKSPACE}/.github/workflows/scripts/flutter-drive-web-retry.sh" | |
| - name: Save Firestore Emulator Cache | |
| # Branches can read main cache but main cannot read branch cache. Avoid LRU eviction with main-only cache. | |
| if: github.ref == 'refs/heads/main' | |
| continue-on-error: true | |
| uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| with: | |
| # The firebase emulators are pure javascript and java, OS-independent | |
| enableCrossOsArchive: true | |
| key: ${{ steps.firebase-emulator-cache.outputs.cache-primary-key }} | |
| # Must match the restore path exactly | |
| path: ~/.cache/firebase/emulators | |
| windows: | |
| needs: changes | |
| if: needs.changes.outputs.windows == 'true' | |
| permissions: | |
| contents: read | |
| runs-on: windows-latest | |
| timeout-minutes: ${{ inputs.nightly_test_mode && 5 || 45 }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| - uses: ./.github/actions/setup-flutterfire | |
| with: | |
| npm-cache: 'false' | |
| bootstrap-scope: 'tests cloud_firestore*' | |
| - name: "Install Tools" | |
| # Not the composite action's firebase-tools install: that one uses `sudo npm`, | |
| # which does not exist on the Windows runners. | |
| run: | | |
| npm install -g firebase-tools@15.25.1 | |
| - name: "Build Windows (Release)" | |
| timeout-minutes: 25 | |
| run: cd tests && flutter build windows --release | |
| - name: "Build Windows (Profile)" | |
| timeout-minutes: 25 | |
| run: cd tests && flutter build windows --profile | |
| - name: Install Cloud Functions dependencies | |
| # `firebase emulators:exec` does not install these itself; without them the | |
| # functions emulator logs "Failed to load function definition" on every run. | |
| run: npm ci --prefix .github/workflows/scripts/functions | |
| - name: Start Firebase Emulator and run tests | |
| timeout-minutes: 30 | |
| env: | |
| STORAGE_EMULATOR_DEBUG: 'true' | |
| run: cd ./.github/workflows/scripts && firebase emulators:exec --project flutterfire-e2e-tests "cd ../../../tests && flutter test .\integration_test\e2e_test.dart -d windows --verbose" |