From 3bb18f225d38f4097678b8132369ad55bab13483 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Wed, 15 Mar 2023 21:56:25 +0100 Subject: [PATCH] ci(all): Migrate to Melos 3 (#1619) --- .github/workflows/scripts/install-tools.sh | 2 +- .gitignore | 1 + melos.yaml | 58 +++++++++++----------- pubspec.yaml | 7 +++ 4 files changed, 38 insertions(+), 30 deletions(-) create mode 100644 pubspec.yaml diff --git a/.github/workflows/scripts/install-tools.sh b/.github/workflows/scripts/install-tools.sh index ab01030438..cb29f0db45 100755 --- a/.github/workflows/scripts/install-tools.sh +++ b/.github/workflows/scripts/install-tools.sh @@ -3,7 +3,7 @@ set -e flutter config --no-analytics -flutter pub global activate melos 2.9.0 +flutter pub global activate melos 3.0.0 echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH echo "$HOME/AppData/Local/Pub/Cache/bin" >> $GITHUB_PATH echo "$GITHUB_WORKSPACE/_flutter/.pub-cache/bin" >> $GITHUB_PATH diff --git a/.gitignore b/.gitignore index 0d5bf4d921..716d799abc 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ build/ **/*.env lcov.info +pubspec_overrides.yaml diff --git a/melos.yaml b/melos.yaml index 1e01fd06fd..8dd43704d8 100644 --- a/melos.yaml +++ b/melos.yaml @@ -37,7 +37,7 @@ scripts: run: | melos bootstrap melos run build:example_ios_pub --no-select - melos run build:example_android_pub --no-select + melos run build:example_android_pub --no-select melos run build:example_web --no-select description: Build all example apps @@ -46,8 +46,8 @@ scripts: melos exec -c 6 --fail-fast -- \ "flutter build ios --no-codesign --no-pub" description: Build a specific example app for iOS. - select-package: - dir-exists: + packageFilters: + dirExists: - ios scope: "*example*" @@ -60,8 +60,8 @@ scripts: melos bootstrap does not generate all files generated by a build that runs `pub get`, and `flutter drive` does not either, so it is still necessary to build sometimes without the `--no-pub` switch. Careful: `melos bootstrap` after. - select-package: - dir-exists: + packageFilters: + dirExists: - ios scope: "*example*" @@ -70,8 +70,8 @@ scripts: melos exec -c 6 --fail-fast -- \ "flutter build apk --no-pub" description: Build a specific example app for Android. - select-package: - dir-exists: + packageFilters: + dirExists: - android scope: "*example*" @@ -80,8 +80,8 @@ scripts: melos exec -c 6 --fail-fast -- \ "flutter build apk" description: Build a specific example app for Android. - select-package: - dir-exists: + packageFilters: + dirExists: - android scope: "*example*" @@ -93,8 +93,8 @@ scripts: Build a specific example app for macOS. - Requires `flutter channel stable`. - Requires `flutter config --enable-macos-desktop` set. - select-package: - dir-exists: + packageFilters: + dirExists: - macos scope: "*example*" @@ -106,8 +106,8 @@ scripts: Build a specific example app for web. - Requires `flutter channel stable`. - Requires `flutter config --enable-linux-desktop` set. - select-package: - dir-exists: + packageFilters: + dirExists: - linux scope: "*example*" @@ -119,8 +119,8 @@ scripts: Build a specific example app for windows. - Requires `flutter channel stable`. - Requires `flutter config --enable-windows-desktop` set. - select-package: - dir-exists: + packageFilters: + dirExists: - windows scope: "*example*" @@ -131,8 +131,8 @@ scripts: description: | Build a specific example app for web. - Requires `flutter channel stable`. - select-package: - dir-exists: + packageFilters: + dirExists: - web scope: "*example*" @@ -149,8 +149,8 @@ scripts: melos exec -c 6 --fail-fast -- \ "flutter test --no-pub" description: Run `flutter test` for a specific package. - select-package: - dir-exists: + packageFilters: + dirExists: - test ignore: - "*web*" @@ -161,8 +161,8 @@ scripts: melos exec -c 1 --fail-fast -- \ "flutter test --no-pub --platform=chrome" description: Run `flutter test --platform=chrome` for a specific '*web' package. - select-package: - dir-exists: + packageFilters: + dirExists: - test scope: "*web*" @@ -173,8 +173,8 @@ scripts: description: | Run all Android or iOS test driver e2e tests in a specific example app. - Requires an Android emulator or iOS simulator. - select-package: - dir-exists: + packageFilters: + dirExists: - test_driver scope: "*example*" @@ -186,8 +186,8 @@ scripts: Run all Web test driver e2e tests in a specific example app. - Requires `flutter channel stable`. - Requires chromedriver running on port 4444. - select-package: - dir-exists: + packageFilters: + dirExists: - web - test_driver scope: "*example*" @@ -200,8 +200,8 @@ scripts: Run all Linux test driver e2e tests in a specific example app. - Requires `flutter channel stable`. - Requires `flutter config --enable-linux-desktop` set. - select-package: - dir-exists: + packageFilters: + dirExists: - linux - test_driver scope: "*example*" @@ -214,8 +214,8 @@ scripts: Run all MacOS test driver e2e tests in a specific example app. - Requires `flutter channel stable`. - Requires `flutter config --enable-macos-desktop` set. - select-package: - dir-exists: + packageFilters: + dirExists: - macos - test_driver scope: "*example*" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000000..fe8d80cb45 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,7 @@ +name: plus_plugins_workspace + +environment: + sdk: ">=2.18.0 <3.0.0" + +dev_dependencies: + melos: ^3.0.0