Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(all): Migrate to Melos 3 #1619

Merged
merged 5 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/scripts/install-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ build/
**/*.env

lcov.info
pubspec_overrides.yaml
58 changes: 29 additions & 29 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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*"

Expand All @@ -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*"

Expand All @@ -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*"

Expand All @@ -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*"

Expand All @@ -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*"

Expand All @@ -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*"

Expand All @@ -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*"

Expand All @@ -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*"

Expand All @@ -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*"
Expand All @@ -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*"

Expand All @@ -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*"

Expand All @@ -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*"
Expand All @@ -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*"
Expand All @@ -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*"
Expand Down
7 changes: 7 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: plus_plugins_workspace

environment:
sdk: ">=2.18.0 <3.0.0"

dev_dependencies:
melos: ^3.0.0