Skip to content

chore(deps): bump bluefireteam/melos-action from 3.9.0 to 3.10.0 (#18… #14401

chore(deps): bump bluefireteam/melos-action from 3.9.0 to 3.10.0 (#18…

chore(deps): bump bluefireteam/melos-action from 3.9.0 to 3.10.0 (#18… #14401

Workflow file for this run

name: all_plugins
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'website/**'
- '**.md'
push:
branches:
- main
paths-ignore:
- 'docs/**'
- 'website/**'
- '**.md'
permissions:
contents: read
jobs:
# analyze, format and test below are deliberately ungated: they are pure Dart
# and every change in the repo is in scope for them. Only the three jobs that
# build for a specific platform - the two Swift ones and the web example
# build - are platform-scoped.
changes:
uses: ./.github/workflows/reusable_repo_changes.yaml
with:
app-path: 'packages/*/*/example'
# Home for every check that needs nothing but a bootstrapped workspace. The
# pub dry run, the example `pub get` and the license-header check used to be
# three separate jobs; each ran for a couple of minutes and paid a full
# checkout + setup + bootstrap to get there, so they are steps here instead.
# Analysis runs first - it is the signal people wait on - and the cheap
# checks follow with `if: always()`, so one failing check still reports the
# others, exactly as separate jobs did.
analyze:
# Covers the folded checks as well as analysis itself.
timeout-minutes: 70
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
# flutter_plugin_tools resolves a git base ref even when analyzing
# everything; a shallow clone has neither history nor origin/main
# ('fatal: Not a valid object name main'). Same as the format job.
fetch-depth: 0
- uses: ./.github/actions/setup-flutterfire
with:
node: 'false'
java: 'false'
# This job needs the whole workspace bootstrapped, which melos-action does itself.
melos-run-bootstrap: 'true'
- name: 'Validate Generated SPM Versions'
run: |
dart run scripts/generate_versions_spm.dart
git diff --exit-code -- ':(glob)packages/**/Package.swift'
- name: 'Run Analyze'
# flutter_plugin_tools is the flutter/packages-standard analyzer driver
# (already used by the format job). The custom-analysis config lists
# every package: FlutterFire manages analysis options centrally, which
# the tool otherwise treats as unexpected. publish-check was evaluated
# too but does not fit this repo's release model (it errors on
# already-published versions and requires AUTHORS files), so the pub
# dry-run below stays on melos.
run: |
dart ./.github/workflows/scripts/generate-dummy-firebase-configs.dart
dart pub global activate flutter_plugin_tools 0.14.2
dart pub global run flutter_plugin_tools analyze \
--base-branch=origin/main \
--custom-analysis=.github/workflows/config/custom_analysis.yaml
(cd tests && dart analyze .)
- name: 'Validate Workspace'
if: always()
run: melos run validate:workspace
# Note `pubspec_overrides.yaml` is not taken into account by
# `pub publish --dry-run`, which is why this used to live in its own job -
# the setup is identical either way, so the split bought nothing.
# This will fail on CI until this is fixed: https://github.com/invertase/melos/issues/467
# You need to switch to Flutter 3.3.0, and run this test manually to check it works and update PR to confirm its success
- name: 'Pub Check (publish dry run)'
if: always()
# `melos bootstrap` (run for the analysis above) syncs versions into the
# Package.swift / Constants.swift files, and `pub publish --dry-run`
# refuses a dirty tree ("checked-in files are modified in git") - the
# standalone job this was folded from started with a fresh checkout.
# Restore the committed state before validating.
run: |
git checkout -- packages/
melos exec -c 1 --no-private --ignore="*example*" -- \
dart pub publish --dry-run
- name: 'Flutter Pub Get (examples)'
if: always()
run: |
melos exec -c 1 --scope="*example*" -- \
"flutter pub get"
# Go is used by addlicense command (addlicense is used in melos run
# check-license-header)
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e
if: always()
with:
go-version: '^1.13.1'
- name: 'Check license headers'
if: always()
run: |
go install github.com/google/addlicense@latest
melos run check-license-header
format:
# switch back to ubuntu-latest when swiftformat is working again
runs-on: macos-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
fetch-depth: 0
- id: setup-flutter-format
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
continue-on-error: true
with:
channel: 'stable'
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
pub-cache-key: "flutter-pub-:os:-:channel:-:version:-:arch:-:hash:"
- name: Retry Flutter setup
if: steps.setup-flutter-format.outcome == 'failure'
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
channel: 'stable'
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
pub-cache-key: "flutter-pub-:os:-:channel:-:version:-:arch:-:hash:"
- uses: bluefireteam/melos-action@b79b63bcd183f823740a7976cbdb4b0fc95a0eb8
with:
melos-version: '5.3.0'
- uses: Homebrew/actions/setup-homebrew@e99025eb970cfa124b8284a35463d87426917478
- name: 'Install Tools'
run: |
alias python=python3
flutter pub global activate flutter_plugin_tools
brew install swiftformat
brew install clang-format
brew link --overwrite --force clang-format
- name: 'Formatter version'
run: |
clang-format --version
swiftformat --version
- name: 'Dart, Java, Objective-C and Swift'
run: |
flutter pub global run flutter_plugin_tools format --base-branch=origin/main
./.github/workflows/scripts/validate-formatting.sh
# Clean generated build artificats(from format step) to prevent post run jobs from timing out
- name: Clean generated build artifacts
if: ${{ always() }}
run: |
rm -rf build
find packages -type d -name build -prune -exec rm -rf {} +
build_examples_dart:
needs: changes
if: needs.changes.outputs.web == 'true'
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: ./.github/actions/setup-flutterfire
with:
node: 'false'
java: 'false'
# This job needs the whole workspace bootstrapped, which melos-action does itself.
melos-run-bootstrap: 'true'
- name: 'Build Examples'
run: |
dart ./.github/workflows/scripts/generate-dummy-firebase-configs.dart
melos exec -c 1 --scope="*example*" --dir-exists="web" -- \
"flutter build web"
# iOS and macOS used to be built back to back in one `swift-integration` job,
# which meant a macOS-only break waited out the whole iOS build first. They
# are independent builds of the same example app, so they run as two jobs.
# `swift-integration.dart` still builds both when no `--platform` is passed,
# which is how it is run locally.
swift-integration-ios:
needs: changes
if: needs.changes.outputs.ios == 'true'
runs-on: xcode-27
timeout-minutes: 35
env:
FLUTTER_DEPENDENCIES: "cloud_firestore firebase_remote_config cloud_functions firebase_database firebase_auth firebase_storage firebase_analytics firebase_messaging firebase_app_check firebase_in_app_messaging firebase_performance firebase_crashlytics firebase_ml_model_downloader firebase_app_installations firebase_ai"
PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: ./.github/actions/setup-flutterfire
with:
node: 'false'
java: 'false'
# This job needs the whole workspace bootstrapped, which melos-action does itself.
melos-run-bootstrap: 'true'
- name: Setup firebase_core example app to test Swift integration
# Run after melos bootstrap so workspace pubspec_overrides resolve unpublished package versions.
run: |
cd packages/firebase_core/firebase_core/example
flutter pub add $FLUTTER_DEPENDENCIES
cd ../../../..
- name: 'Swift Integration Setup'
run: flutter config --enable-swift-package-manager
- name: 'Build iOS App with Swift Package Manager'
run: |
dart ./.github/workflows/scripts/generate-dummy-firebase-configs.dart
dart ./.github/workflows/scripts/swift-integration.dart --platform=ios $FLUTTER_DEPENDENCIES
swift-integration-macos:
needs: changes
if: needs.changes.outputs.macos == 'true'
runs-on: xcode-27
timeout-minutes: 35
env:
FLUTTER_DEPENDENCIES: "cloud_firestore firebase_remote_config cloud_functions firebase_database firebase_auth firebase_storage firebase_analytics firebase_messaging firebase_app_check firebase_in_app_messaging firebase_performance firebase_crashlytics firebase_ml_model_downloader firebase_app_installations firebase_ai"
PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: ./.github/actions/setup-flutterfire
with:
node: 'false'
java: 'false'
# This job needs the whole workspace bootstrapped, which melos-action does itself.
melos-run-bootstrap: 'true'
- name: Setup firebase_core example app to test Swift integration
# Run after melos bootstrap so workspace pubspec_overrides resolve unpublished package versions.
run: |
cd packages/firebase_core/firebase_core/example
flutter pub add $FLUTTER_DEPENDENCIES
cd ../../../..
- name: 'Swift Integration Setup'
run: flutter config --enable-swift-package-manager
- name: 'Build macOS App with Swift Package Manager'
# The script drops firebase_messaging from the example app before the
# macOS build; with iOS in its own job that no longer has to happen
# after a successful iOS build in the same checkout.
run: |
dart ./.github/workflows/scripts/generate-dummy-firebase-configs.dart
dart ./.github/workflows/scripts/swift-integration.dart --platform=macos $FLUTTER_DEPENDENCIES
test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: ./.github/actions/setup-flutterfire
with:
node: 'false'
java: 'false'
# This job needs the whole workspace bootstrapped, which melos-action does itself.
melos-run-bootstrap: 'true'
- name: 'Flutter Test'
run: melos run test --no-select
- name: 'Flutter Test - Web'
run: melos run test:web --no-select
# Ruby, not Dart: crashlytics_add_upload_symbols_test.rb checks the generated
# Xcode Run Script. It only needs the xcodeproj gem, so it stays off the
# Flutter bootstrap used by the test job above.
crashlytics_upload_symbols:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Run Crashlytics upload-symbols script test
env:
GEM_HOME: ${{ github.workspace }}/.gem
run: |
mkdir -p "$GEM_HOME"
gem install xcodeproj --no-document
ruby packages/firebase_crashlytics/firebase_crashlytics/ios/crashlytics_add_upload_symbols_test.rb