From ed60bece0b21ee0fc54429821a188444ee97241b Mon Sep 17 00:00:00 2001 From: Majid Date: Sat, 2 Oct 2021 14:56:42 +0200 Subject: [PATCH 01/22] update melos to support more functions and compatible with latest version --- melos.yaml | 238 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 171 insertions(+), 67 deletions(-) diff --git a/melos.yaml b/melos.yaml index 6ebf9be50e..535c1cfc1c 100644 --- a/melos.yaml +++ b/melos.yaml @@ -13,9 +13,11 @@ packages: scripts: lint:all: run: melos run analyze && melos run format - description: Run all static analysis checks - # Analyze the project for Dart analysis issues. - # - Requires `pub global activate tuneup`. + description: | + Run all static analysis checks + - Analyze the project for Dart analysis issues. + - Requires `pub global activate tuneup`. + analyze: run: | melos exec -c 5 -- \ @@ -24,74 +26,173 @@ scripts: Run `dart analyze` in all packages. - Note: you can also rely on your IDEs Dart Analysis / Issues window. - # Formats the code of all packages (Java, Objective-C, and Dart). - # - Requires `flutter_plugin_tools` (`pub global activate flutter_plugin_tools`). - # - Requires `git`. - # - Requires `clang-format` (can be installed via Brew on MacOS). - format: pub global run flutter_plugin_tools format - - # Build iOS plugin example apps. - build:examples:ios: > - melos exec -c 1 --scope="*example*" --fail-fast -- \ - flutter build ios --no-codesign - - # Build example bundles. - build:examples:bundle: > - melos exec -c 1 --scope="*example*" --fail-fast -- \ - flutter build bundle - - # Build Android plugin example apps. - build:examples:android: > - melos exec -c 1 --scope="*example*" --fail-fast -- \ - flutter build apk - - # Build any plugin example apps that have MacOS support. - # - Requires `flutter config --enable-macos-desktop` enabled. - # - Requires `flutter channel master && flutter upgrade`. - build:examples:macos: > - melos exec -c 1 --scope="*example*" --dir-exists=macos --fail-fast -- \ - flutter build macos - - # Run standard flutter tests in all packages that have them. - test: > - melos exec -c 1 --fail-fast --dir-exists=test --ignore="*example*" --ignore="*web*" -- \ - flutter test - - test:web: > - melos exec -c 1 --fail-fast --dir-exists=test --scope="*web*" -- \ - flutter test --platform=chrome - - # Coverage - coverage: > - melos exec -c 1 --fail-fast --dir-exists=test --ignore="*example*" --ignore="*web*" -- \ - flutter test --coverage + format: + run: dart pub global run flutter_plugin_tools format + description: | + Build a specific example app for Android. + - Requires `flutter_plugin_tools` (`pub global activate flutter_plugin_tools`). + - Requires `clang-format` (can be installed via Brew on macOS). - # Run all test driver e2e tests in the example apps, use this for mobile. - # Will target Android/iOS depending on what emulator/simulator you have running. - test:e2e: > - melos exec -c 1 --fail-fast --scope="*example*" --dir-exists=test_driver -- \ - flutter drive --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart + build:all: + run: | + melos run build:example_ios_pub --no-select && melos run build:example_android_pub --no-select && melos run build:example_macos --no-select && melos bootstrap + description: Build all example apps - # Run all web test driver e2e tests in the example apps. - # - Requires `flutter channel master && flutter upgrade`. - # - Requires `flutter config --enable-web` enabled. - test:e2e:web: > - melos exec -c 1 --fail-fast --dir-exists=web --scope="*example*" --dir-exists=test_driver -- \ - flutter drive --release -d chrome --no-pub --verbose-system-logs --browser-name=chrome --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart + build:example_ios: + run: | + 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: + - ios + scope: "*example*" + + build:example_ios_pub: + run: | + melos exec -c 6 --fail-fast -- \ + "flutter build ios --no-codesign" + description: | + Build a specific example app for iOS. + 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: + - ios + scope: "*example*" + + build:example_android: + run: | + melos exec -c 6 --fail-fast -- \ + "flutter build apk --no-pub" + description: Build a specific example app for Android. + select-package: + dir-exists: + - android + scope: "*example*" + + # 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. + build:example_android_pub: + run: | + melos exec -c 6 --fail-fast -- \ + "flutter build apk" + description: Build a specific example app for Android. + select-package: + dir-exists: + - android + scope: "*example*" + + build:example_macos: + run: | + melos exec -c 6 --fail-fast -- \ + "flutter build macos --no-pub" + description: | + Build a specific example app for macOS. + - Requires `flutter channel stable`. + - Requires `flutter config --enable-macos-desktop` set. + select-package: + dir-exists: + - macos + scope: "*example*" + + test:all: + run: melos run test --no-select && melos run test:mobile_e2e --no-select + description: Run all tests available on stable channel + + test:unit_all: + run: melos run test --no-select + description: Run all tests available on stable channel + + test: + run: | + melos exec -c 6 --fail-fast -- \ + "flutter test --no-pub" + description: Run `flutter test` for a specific package. + select-package: + dir-exists: + - test + ignore: + - "*web*" + - "*example*" + + test:web: + run: | + 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: + - test + scope: "*web*" + + test:mobile_e2e: + run: | + melos exec -c 1 --fail-fast -- \ + "flutter drive --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart" + 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: + - test_driver + scope: "*example*" + ignore: + - "*firebase_ml_vision*" + - "*firebase_admob*" + + test:web_e2e: + run: | + melos exec -c 1 --fail-fast -- \ + "flutter drive --device-id=web-server --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart" + description: | + Run all Web test driver e2e tests in a specific example app. + - Requires `flutter channel master` (or beta). + - Requires `flutter config --enable-web` set. + - Requires chromedriver running on port 4444. + select-package: + dir-exists: + - web + - test_driver + scope: "*example*" # Run all Linux test driver e2e tests in the example apps. # - Requires `flutter config --enable-linux-desktop` enabled. # - Requires `flutter channel dev && flutter upgrade`. - test:e2e:linux: > - melos exec -c 1 --fail-fast --dir-exists=linux --scope="*example*" --dir-exists=test_driver -- \ - xvfb-run -a flutter drive -d linux --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart + test:linux_e2e: + run: | + melos exec -c 1 --fail-fast -- \ + "flutter drive -d linux --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart" + description: | + Run all Linux test driver e2e tests in a specific example app. + - Requires `flutter channel master`. + - Requires `flutter config --enable-linux-desktop` set. + select-package: + dir-exists: + - linux + - test_driver + scope: "*example*" + + test:macos_e2e: + run: | + melos exec -c 1 --fail-fast -- \ + "flutter drive -d macos --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart" + description: | + Run all MacOS test driver e2e tests in a specific example app. + - Requires `flutter channel master`. + - Requires `flutter config --enable-macos-desktop` set. + select-package: + dir-exists: + - macos + - test_driver + scope: "*example*" - # Run all MacOS test driver e2e tests in the example apps. - # - Requires `flutter config --enable-macos-desktop` enabled. - # - Requires `flutter channel master && flutter upgrade`. - test:e2e:macos: > - melos exec -c 1 --fail-fast --dir-exists=macos --scope="*example*" --dir-exists=test_driver -- \ - flutter drive -d macos --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart + # Coverage + coverage: > + melos exec -c 1 --fail-fast --dir-exists=test --ignore="*example*" --ignore="*web*" -- \ + flutter test --coverage # Check pubspecs are valid and publishable in each package. lint:pub: > @@ -102,14 +203,17 @@ scripts: clean:deep: > git clean -x -d -f -q + # Run all targets generally expected in CI for a full local quality check + qualitycheck: > + melos run clean:deep && melos clean && melos bootstrap && melos run lint:all && melos run build:all && melos run test:all + # Additional cleanup lifecycle script, executed when `melos clean` is ran. postclean: > - melos exec -- \ - rm -rf ./build ./android/.gradle ./ios/.symlinks ./ios/Pods ./android/.idea ./.idea ./.dart-tool/build + melos exec -c 6 -- "flutter clean" dev_dependencies: pedantic: 1.10.0 environment: sdk: ">=2.12.0 <3.0.0" - flutter: ">=1.12.13+hotfix.5" + flutter: ">=1.12.13+hotfix.5 <2.0.0" From 29ed88697a6920ef2b88fb501c450e51d30f1320 Mon Sep 17 00:00:00 2001 From: Majid Date: Sat, 2 Oct 2021 15:00:41 +0200 Subject: [PATCH 02/22] Transition of platform channel test interfaces to flutter_test package --- packages/sensors_plus/sensors_plus/test/sensors_test.dart | 5 +++-- .../test/sensors_plus_platform_interface_test.dart | 5 +++-- .../test/share_plus_platform_interface_test.dart | 8 +++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/sensors_plus/sensors_plus/test/sensors_test.dart b/packages/sensors_plus/sensors_plus/test/sensors_test.dart index 2a98c1d9fc..9bbfb603b5 100644 --- a/packages/sensors_plus/sensors_plus/test/sensors_test.dart +++ b/packages/sensors_plus/sensors_plus/test/sensors_test.dart @@ -5,7 +5,8 @@ import 'dart:typed_data'; import 'package:flutter/services.dart'; -import 'package:flutter_test/flutter_test.dart' show TestWidgetsFlutterBinding; +import 'package:flutter_test/flutter_test.dart' + show TestDefaultBinaryMessengerBinding, TestWidgetsFlutterBinding; import 'package:sensors_plus/sensors_plus.dart'; import 'package:test/test.dart'; @@ -72,7 +73,7 @@ void _initializeFakeSensorChannel(String channelName, List sensorData) { ); } - ServicesBinding.instance!.defaultBinaryMessenger + TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger .setMockMessageHandler(channelName, (ByteData? message) async { final methodCall = standardMethod.decodeMethodCall(message); if (methodCall.method == 'listen') { diff --git a/packages/sensors_plus/sensors_plus_platform_interface/test/sensors_plus_platform_interface_test.dart b/packages/sensors_plus/sensors_plus_platform_interface/test/sensors_plus_platform_interface_test.dart index b7bff2dbf4..fb32e1f4ed 100644 --- a/packages/sensors_plus/sensors_plus_platform_interface/test/sensors_plus_platform_interface_test.dart +++ b/packages/sensors_plus/sensors_plus_platform_interface/test/sensors_plus_platform_interface_test.dart @@ -5,7 +5,8 @@ import 'dart:typed_data'; import 'package:flutter/services.dart'; -import 'package:flutter_test/flutter_test.dart' show TestWidgetsFlutterBinding; +import 'package:flutter_test/flutter_test.dart' + show TestDefaultBinaryMessengerBinding, TestWidgetsFlutterBinding; import 'package:sensors_plus_platform_interface/sensors_plus_platform_interface.dart'; import 'package:sensors_plus_platform_interface/src/method_channel_sensors.dart'; import 'package:test/test.dart'; @@ -95,7 +96,7 @@ void _initializeFakeSensorChannel(String channelName, List sensorData) { ); } - ServicesBinding.instance!.defaultBinaryMessenger + TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger .setMockMessageHandler(channelName, (ByteData? message) async { final methodCall = standardMethod.decodeMethodCall(message); if (methodCall.method == 'listen') { diff --git a/packages/share_plus/share_plus_platform_interface/test/share_plus_platform_interface_test.dart b/packages/share_plus/share_plus_platform_interface/test/share_plus_platform_interface_test.dart index 68de78e751..18cc581af7 100644 --- a/packages/share_plus/share_plus_platform_interface/test/share_plus_platform_interface_test.dart +++ b/packages/share_plus/share_plus_platform_interface/test/share_plus_platform_interface_test.dart @@ -5,7 +5,8 @@ import 'dart:io'; import 'dart:ui'; -import 'package:flutter_test/flutter_test.dart' show TestWidgetsFlutterBinding; +import 'package:flutter_test/flutter_test.dart' + show TestDefaultBinaryMessengerBinding, TestWidgetsFlutterBinding; import 'package:mockito/mockito.dart'; import 'package:share_plus_platform_interface/share_plus_platform_interface.dart'; import 'package:share_plus_platform_interface/method_channel/method_channel_share.dart'; @@ -21,8 +22,9 @@ void main() { setUp(() { mockChannel = MockMethodChannel(); // Re-pipe to mockito for easier verifies. - MethodChannelShare.channel - .setMockMethodCallHandler((MethodCall call) async { + TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger + .setMockMethodCallHandler(MethodChannelShare.channel, + (MethodCall call) async { // The explicit type can be void as the only method call has a return type of void. await mockChannel.invokeMethod(call.method, call.arguments); }); From 5fc5444bb987070819a531cc7547227152ab3062 Mon Sep 17 00:00:00 2001 From: Majid Date: Sat, 2 Oct 2021 16:06:29 +0200 Subject: [PATCH 03/22] new workflows for all plugins --- .github/workflows/all_plugins.yaml | 159 ++++++++---------- melos.yaml | 3 - .../test/sensors_plus_web_test.dart | 5 - 3 files changed, 67 insertions(+), 100 deletions(-) delete mode 100644 packages/sensors_plus/sensors_plus_web/test/sensors_plus_web_test.dart diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index 459db4f615..5cc5ad3bc1 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -1,154 +1,129 @@ -name: all_plugins +ame: all_plugins on: pull_request: + paths-ignore: + - "docs/**" + - "website/**" + - "**.md" push: branches: - - main + - master paths-ignore: - "docs/**" + - "website/**" + - "**.md" jobs: analyze: timeout-minutes: 15 runs-on: ubuntu-latest steps: - - name: "Git Checkout" - uses: actions/checkout@v2 + - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 - name: "Install Flutter" - uses: subosito/flutter-action@v1 - with: - flutter-version: "2.2.1" + run: ./.github/workflows/scripts/install-flutter.sh stable - name: "Install Tools" run: | - flutter pub global activate melos - flutter pub global activate tuneup + ./.github/workflows/scripts/install-tools.sh - name: "Bootstrap Workspace" run: melos bootstrap - - name: "Dart Analyze" - run: | - melos run analyze + - name: "Run Analyze" + run: melos run analyze - name: "Pub Check" run: | - melos run lint:pub + melos exec -c 1 --no-private --ignore="*example*" -- \ + pub publish --dry-run - format: + pub_get_check: + timeout-minutes: 15 runs-on: ubuntu-latest - timeout-minutes: 30 steps: - - name: "Git Checkout" - uses: actions/checkout@v2 + - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 - name: "Install Flutter" - uses: subosito/flutter-action@v1 + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Flutter Pub Get" + run: | + melos exec -c 1 --scope="*example*" -- \ + "flutter pub get" + format: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 with: - flutter-version: "2.2.1" + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable - name: "Install Tools" run: | - sudo apt update - sudo apt install -y clang-format - flutter pub global activate melos - pub global activate flutter_plugin_tools 0.1.4 + ./.github/workflows/scripts/install-tools.sh + curl -sL https://github.com/google/google-java-format/releases/download/google-java-format-1.3/google-java-format-1.3-all-deps.jar -o $HOME/google-java-format.jar - name: "Bootstrap Workspace" run: melos bootstrap - - name: "Melos Format" - run: melos run format - - name: "Validate Formatting" + - name: "Dart" run: | + melos exec -c 1 -- \ + "flutter format ." + ./.github/workflows/scripts/validate-formatting.sh + - name: "Objective-C" + if: ${{ success() || failure() }} + run: | + melos exec -c 4 --ignore="*platform_interface*" --ignore="*web*" -- \ + find . -maxdepth 3 -name "*.h" -o -name "*.m" -print0 \| xargs -0 clang-format -i --style=Google --verbose + ./.github/workflows/scripts/validate-formatting.sh + - name: "Java" + if: ${{ success() || failure() }} + run: | + melos exec -c 4 --ignore="*platform_interface*" --ignore="*web*" -- \ + find . -maxdepth 12 -name "*.java" -print0 \| xargs -0 java -jar $HOME/google-java-format.jar --replace ./.github/workflows/scripts/validate-formatting.sh - build_examples_dart: timeout-minutes: 15 runs-on: ubuntu-latest steps: - - name: "Git Checkout" - uses: actions/checkout@v2 + - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 - name: "Install Flutter" - uses: subosito/flutter-action@v1 - with: - flutter-version: "2.2.1" + run: ./.github/workflows/scripts/install-flutter.sh stable - name: "Install Tools" - run: flutter pub global activate melos + run: | + ./.github/workflows/scripts/install-tools.sh + flutter config --enable-web - name: "Bootstrap Workspace" run: melos bootstrap - - name: "Build Example Snapshots" + - name: "Build Examples" run: | - melos run build:examples:bundle - + melos exec -c 1 --scope="*example*" --dir-exists="web" -- \ + "flutter build web --no-pub" test: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - continue-on-error: true + runs-on: ubuntu-latest timeout-minutes: 15 steps: - - name: "Git Checkout" - uses: actions/checkout@v2 + - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 - name: "Install Flutter" - uses: subosito/flutter-action@v1 - with: - flutter-version: "2.2.1" + run: ./.github/workflows/scripts/install-flutter.sh stable - name: "Install Tools" - run: flutter pub global activate melos + run: ./.github/workflows/scripts/install-tools.sh - name: "Bootstrap Workspace" run: melos bootstrap - name: "Flutter Test" - run: | - melos run test - if: matrix.os != 'ubuntu-latest' - - name: "Flutter web Test" - run: | - melos run test:web - if: matrix.os != 'ubuntu-latest' + run: melos run test --no-select + - name: "Flutter Test - Web" + run: melos run test:web --no-select - name: "Collect Coverage" - run: | - melos run coverage - if: matrix.os == 'ubuntu-latest' + run: melos run coverage - name: Upload Coverage uses: codecov/codecov-action@v1 with: token: ${{secrets.CODECOV_TOKEN}} files: packages/*/coverage/lcov.info - if: matrix.os == 'ubuntu-latest' - - integration_tests: - if: false # currently broken, see issue 220 - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [ubuntu-latest] - continue-on-error: true - timeout-minutes: 15 - steps: - - name: "Git Checkout" - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: "Install Flutter" - uses: subosito/flutter-action@v1 - with: - channel: dev - - name: "Install Tools" - run: | - flutter pub global activate melos - flutter config --enable-linux-desktop - - name: "Setup Linux" - run: | - sudo apt update - sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format - sudo apt install -y network-manager upower - if: matrix.os == 'ubuntu-latest' - - name: "Bootstrap Workspace" - run: melos bootstrap - - name: "Flutter Integration Test" - run: | - melos run test:e2e:linux - if: matrix.os == 'ubuntu-latest' diff --git a/melos.yaml b/melos.yaml index 535c1cfc1c..43dd308178 100644 --- a/melos.yaml +++ b/melos.yaml @@ -139,9 +139,6 @@ scripts: dir-exists: - test_driver scope: "*example*" - ignore: - - "*firebase_ml_vision*" - - "*firebase_admob*" test:web_e2e: run: | diff --git a/packages/sensors_plus/sensors_plus_web/test/sensors_plus_web_test.dart b/packages/sensors_plus/sensors_plus_web/test/sensors_plus_web_test.dart deleted file mode 100644 index bd8bc742bd..0000000000 --- a/packages/sensors_plus/sensors_plus_web/test/sensors_plus_web_test.dart +++ /dev/null @@ -1,5 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; - -void main() { - test('check', () {}); -} From 40add658e6db102d4562ad5daf680711ae2736d1 Mon Sep 17 00:00:00 2001 From: Majid Date: Sat, 2 Oct 2021 16:06:45 +0200 Subject: [PATCH 04/22] new scripts --- .github/workflows/scripts/build-examples.sh | 39 +++++++++++++++ .github/workflows/scripts/drive-example.sh | 52 ++++++++++++++++++++ .github/workflows/scripts/install-flutter.sh | 6 +++ .github/workflows/scripts/install-tools.sh | 7 +++ 4 files changed, 104 insertions(+) create mode 100755 .github/workflows/scripts/build-examples.sh create mode 100755 .github/workflows/scripts/drive-example.sh create mode 100755 .github/workflows/scripts/install-flutter.sh create mode 100755 .github/workflows/scripts/install-tools.sh diff --git a/.github/workflows/scripts/build-examples.sh b/.github/workflows/scripts/build-examples.sh new file mode 100755 index 0000000000..e31526d9c4 --- /dev/null +++ b/.github/workflows/scripts/build-examples.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +DEFAULT_TARGET="./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart" + +ACTION=$1 +TARGET_FILE=${2:-$DEFAULT_TARGET} + +melos bootstrap --scope="$PLUS_PLUGIN_SCOPE" + +if [ "$ACTION" == "android" ] +then + melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" -- \ + flutter build apk $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --dart-define=CI=true --no-android-gradle-daemon + MELOS_EXIT_CODE=$? + pkill dart || true + pkill java || true + exit $MELOS_EXIT_CODE +fi + +if [ "$ACTION" == "ios" ] +then + melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" -- \ + flutter build ios $FLUTTER_COMMAND_FLAGS --no-codesign --simulator --debug --target="$TARGET_FILE" --dart-define=CI=true + exit +fi + +if [ "$ACTION" == "macos" ] +then + melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" -- \ + flutter build macos $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --device-id=macos --dart-define=CI=true + exit +fi + +if [ "$ACTION" == "linux" ] +then + melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" -- \ + flutter build linux $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --device-id=linux --dart-define=CI=true + exit +fi \ No newline at end of file diff --git a/.github/workflows/scripts/drive-example.sh b/.github/workflows/scripts/drive-example.sh new file mode 100755 index 0000000000..df5ec43270 --- /dev/null +++ b/.github/workflows/scripts/drive-example.sh @@ -0,0 +1,52 @@ +.#!/bin/bash + +ACTION=$1 + +if [ "$ACTION" == "android" ] +then + # Sleep to allow emulator to settle. + sleep 15 + melos exec -c 1 --fail-fast --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" --dir-exists=test_driver -- \ + flutter drive $FLUTTER_COMMAND_FLAGS --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart --dart-define=CI=true + exit +fi + +if [ "$ACTION" == "ios" ] +then + SIMULATOR="iPhone 11" + # Boot simulator and wait for System app to be ready. + xcrun simctl bootstatus "$SIMULATOR" -b + xcrun simctl logverbose "$SIMULATOR" enable + # Sleep to allow simulator to settle. + sleep 15 + # Uncomment following line to have simulator logs printed out for debugging purposes. + # xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' & + melos exec -c 1 --fail-fast --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" --dir-exists=test_driver -- \ + flutter drive $FLUTTER_COMMAND_FLAGS -d \"$SIMULATOR\" --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart --dart-define=CI=true + MELOS_EXIT_CODE=$? + xcrun simctl shutdown "$SIMULATOR" + exit $MELOS_EXIT_CODE +fi + +if [ "$ACTION" == "macos" ] +then + melos exec -c 1 --fail-fast --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" --dir-exists=test_driver -- \ + flutter drive $FLUTTER_COMMAND_FLAGS -d macos --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart --dart-define=CI=true + exit +fi + +if [ "$ACTION" == "linux" ] +then + melos exec -c 1 --fail-fast --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" --dir-exists=test_driver -- \ + flutter drive $FLUTTER_COMMAND_FLAGS -d linux --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart --dart-define=CI=true + exit +fi + +if [ "$ACTION" == "web" ] +then + melos bootstrap --scope="$PLUS_PLUGIN_SCOPE" + chromedriver --port=4444 & + melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" --dir-exists=web -- \ + flutter drive $FLUTTER_COMMAND_FLAGS --no-pub --verbose-system-logs --device-id=web-server --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart --dart-define=CI=true + exit +fi \ No newline at end of file diff --git a/.github/workflows/scripts/install-flutter.sh b/.github/workflows/scripts/install-flutter.sh new file mode 100755 index 0000000000..9ae26bec02 --- /dev/null +++ b/.github/workflows/scripts/install-flutter.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +BRANCH=$1 + +git clone https://github.com/flutter/flutter.git --depth 1 -b $BRANCH _flutter +echo "$GITHUB_WORKSPACE/_flutter/bin" >> $GITHUB_PATH \ No newline at end of file diff --git a/.github/workflows/scripts/install-tools.sh b/.github/workflows/scripts/install-tools.sh new file mode 100755 index 0000000000..da75d3b16f --- /dev/null +++ b/.github/workflows/scripts/install-tools.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +flutter config --no-analytics +flutter pub global activate melos +echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH +echo "$GITHUB_WORKSPACE/_flutter/.pub-cache/bin" >> $GITHUB_PATH +echo "$GITHUB_WORKSPACE/_flutter/bin/cache/dart-sdk/bin" >> $GITHUB_PATH \ No newline at end of file From 62bca83d08fb3b183c3bafa90f57784e0cd4123c Mon Sep 17 00:00:00 2001 From: Majid Date: Sat, 2 Oct 2021 16:13:03 +0200 Subject: [PATCH 05/22] rename branch to main --- .github/workflows/all_plugins.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index 5cc5ad3bc1..73d5bc648b 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -8,7 +8,7 @@ on: - "**.md" push: branches: - - master + - main paths-ignore: - "docs/**" - "website/**" @@ -52,6 +52,7 @@ jobs: run: | melos exec -c 1 --scope="*example*" -- \ "flutter pub get" + format: runs-on: ubuntu-latest timeout-minutes: 15 @@ -84,6 +85,7 @@ jobs: melos exec -c 4 --ignore="*platform_interface*" --ignore="*web*" -- \ find . -maxdepth 12 -name "*.java" -print0 \| xargs -0 java -jar $HOME/google-java-format.jar --replace ./.github/workflows/scripts/validate-formatting.sh + build_examples_dart: timeout-minutes: 15 runs-on: ubuntu-latest @@ -103,7 +105,7 @@ jobs: run: | melos exec -c 1 --scope="*example*" --dir-exists="web" -- \ "flutter build web --no-pub" - test: + test_and_coverage: runs-on: ubuntu-latest timeout-minutes: 15 steps: From 3ac8f2e2942b773a2b839329ae967936be0b6939 Mon Sep 17 00:00:00 2001 From: Majid Date: Sat, 2 Oct 2021 16:13:55 +0200 Subject: [PATCH 06/22] fix name --- .github/workflows/all_plugins.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index 73d5bc648b..00deb81bb8 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -1,4 +1,4 @@ -ame: all_plugins +name: all_plugins on: pull_request: From a1693fb8de03b0044a1fdd60e66b3d1df5fa1b29 Mon Sep 17 00:00:00 2001 From: Majid Date: Sat, 2 Oct 2021 16:26:30 +0200 Subject: [PATCH 07/22] add external to stuct --- .github/workflows/all_plugins.yaml | 1 + .../package_info_plus_windows/lib/src/file_version_info.dart | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index 00deb81bb8..537b2f6c39 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -105,6 +105,7 @@ jobs: run: | melos exec -c 1 --scope="*example*" --dir-exists="web" -- \ "flutter build web --no-pub" + test_and_coverage: runs-on: ubuntu-latest timeout-minutes: 15 diff --git a/packages/package_info_plus/package_info_plus_windows/lib/src/file_version_info.dart b/packages/package_info_plus/package_info_plus_windows/lib/src/file_version_info.dart index ccc85a1368..d863fdfe61 100644 --- a/packages/package_info_plus/package_info_plus_windows/lib/src/file_version_info.dart +++ b/packages/package_info_plus/package_info_plus_windows/lib/src/file_version_info.dart @@ -10,10 +10,10 @@ part of package_info_plus_windows; class _LANGANDCODEPAGE extends Struct { @Uint16() - int? wLanguage; + external int? wLanguage; @Uint16() - int? wCodePage; + external int? wCodePage; } final _kernel32 = DynamicLibrary.open('kernel32.dll'); From cd5fc1531f0859790f9059e1daf25e467a8f076e Mon Sep 17 00:00:00 2001 From: Majid Date: Sat, 2 Oct 2021 16:56:04 +0200 Subject: [PATCH 08/22] add workflow for each package --- .../workflows/android_alarm_manager_plus.yaml | 64 ++++++++++++ .github/workflows/android_intent_plus.yaml | 64 ++++++++++++ .github/workflows/battery_plus.yaml | 97 +++++++++++++++++++ .github/workflows/connectivity_plus.yaml | 97 +++++++++++++++++++ .github/workflows/device_info_plus.yaml | 97 +++++++++++++++++++ .github/workflows/network_info_plus.yaml | 97 +++++++++++++++++++ .github/workflows/package_info_plus.yaml | 97 +++++++++++++++++++ .github/workflows/scripts/build-examples.sh | 18 +++- .github/workflows/sensors_plus.yaml | 80 +++++++++++++++ .github/workflows/share_plus.yaml | 97 +++++++++++++++++++ melos.yaml | 17 ++-- 11 files changed, 817 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/android_alarm_manager_plus.yaml create mode 100644 .github/workflows/android_intent_plus.yaml create mode 100644 .github/workflows/battery_plus.yaml create mode 100644 .github/workflows/connectivity_plus.yaml create mode 100644 .github/workflows/device_info_plus.yaml create mode 100644 .github/workflows/network_info_plus.yaml create mode 100644 .github/workflows/package_info_plus.yaml create mode 100644 .github/workflows/sensors_plus.yaml create mode 100644 .github/workflows/share_plus.yaml diff --git a/.github/workflows/android_alarm_manager_plus.yaml b/.github/workflows/android_alarm_manager_plus.yaml new file mode 100644 index 0000000000..15dff60e1b --- /dev/null +++ b/.github/workflows/android_alarm_manager_plus.yaml @@ -0,0 +1,64 @@ +name: android_alarm_manager_plus + +on: + pull_request: + paths: + - "packages/android_alarm_manager_plus/**" + - ".github/workflows/android_alarm_manager_plus.yaml" + push: + branches: + - main + paths-ignore: + - "docs/**" + - "**.md" + +defaults: + run: + working-directory: packages/android_alarm_manager_plus + +env: + PLUS_PLUGIN_SCOPE: "*android_alarm_manager_plus*" + PLUS_PLUGIN_SCOPE_EXAMPLE: "*android_alarm_manager_plus_example*" + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Build Android Example" + run: | + ./.github/workflows/scripts/build-example.sh android + if: matrix.os == 'macos-latest' + + integration_tests: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Setup Linux" + run: | + sudo apt update + sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format + sudo apt install -y network-manager upower + flutter config --enable-linux-desktop + if: matrix.os == 'ubuntu-latest' + - name: "Bootstrap Workspace" + run: melos bootstrap + - name: "Flutter Integration Test" + run: | + melos run test:linux_e2e diff --git a/.github/workflows/android_intent_plus.yaml b/.github/workflows/android_intent_plus.yaml new file mode 100644 index 0000000000..a964aa1f1d --- /dev/null +++ b/.github/workflows/android_intent_plus.yaml @@ -0,0 +1,64 @@ +name: android_intent_plus + +on: + pull_request: + paths: + - "packages/android_intent_plus/**" + - ".github/workflows/android_intent_plus.yaml" + push: + branches: + - main + paths-ignore: + - "docs/**" + - "**.md" + +defaults: + run: + working-directory: packages/android_intent_plus + +env: + PLUS_PLUGIN_SCOPE: "*android_intent_plus*" + PLUS_PLUGIN_SCOPE_EXAMPLE: "*android_intent_plus_example*" + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Build Android Example" + run: | + ./.github/workflows/scripts/build-example.sh android + if: matrix.os == 'macos-latest' + + integration_tests: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Setup Linux" + run: | + sudo apt update + sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format + sudo apt install -y network-manager upower + flutter config --enable-linux-desktop + if: matrix.os == 'ubuntu-latest' + - name: "Bootstrap Workspace" + run: melos bootstrap + - name: "Flutter Integration Test" + run: | + melos run test:linux_e2e diff --git a/.github/workflows/battery_plus.yaml b/.github/workflows/battery_plus.yaml new file mode 100644 index 0000000000..dc6d6d25f4 --- /dev/null +++ b/.github/workflows/battery_plus.yaml @@ -0,0 +1,97 @@ +name: battery_plus + +on: + pull_request: + paths: + - "packages/battery_plus/**" + - ".github/workflows/battery_plus.yaml" + push: + branches: + - main + paths-ignore: + - "docs/**" + - "**.md" + +defaults: + run: + working-directory: packages/battery_plus + +env: + PLUS_PLUGIN_SCOPE: "*battery_plus*" + PLUS_PLUGIN_SCOPE_EXAMPLE: "*battery_plus_example*" + +jobs: + build: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Build Web Example" + run: | + flutter config --enable-web + ./.github/workflows/scripts/build-example.sh web + if: matrix.os == 'ubuntu-latest' + - name: "Build Linux Example" + run: | + flutter config --enable-linux-desktop + ./.github/workflows/scripts/build-example.sh linux + if: matrix.os == 'ubuntu-latest' + - name: "Build Android Example" + run: | + ./.github/workflows/scripts/build-example.sh android + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + ./.github/workflows/scripts/build-example.sh ios + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + flutter config --enable-macos-desktop + ./.github/workflows/scripts/build-example.sh macos + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + flutter config --enable-windows-desktop + ./.github/workflows/scripts/build-example.sh windows + if: matrix.os == 'windows-latest' + + integration_tests: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ubuntu-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Setup Linux" + run: | + sudo apt update + sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format + sudo apt install -y network-manager upower + flutter config --enable-linux-desktop + if: matrix.os == 'ubuntu-latest' + - name: "Bootstrap Workspace" + run: melos bootstrap + - name: "Flutter Integration Test" + run: | + melos run test:mobile_e2e + melos run test:web_e2e + melos run test:linux_e2e + if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/connectivity_plus.yaml b/.github/workflows/connectivity_plus.yaml new file mode 100644 index 0000000000..b860dfe316 --- /dev/null +++ b/.github/workflows/connectivity_plus.yaml @@ -0,0 +1,97 @@ +name: connectivity_plus + +on: + pull_request: + paths: + - "packages/connectivity_plus/**" + - ".github/workflows/connectivity_plus.yaml" + push: + branches: + - main + paths-ignore: + - "docs/**" + - "**.md" + +defaults: + run: + working-directory: packages/connectivity_plus + +env: + PLUS_PLUGIN_SCOPE: "*connectivity_plus*" + PLUS_PLUGIN_SCOPE_EXAMPLE: "*connectivity_plus_example*" + +jobs: + build: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Build Web Example" + run: | + flutter config --enable-web + ./.github/workflows/scripts/build-example.sh web + if: matrix.os == 'ubuntu-latest' + - name: "Build Linux Example" + run: | + flutter config --enable-linux-desktop + ./.github/workflows/scripts/build-example.sh linux + if: matrix.os == 'ubuntu-latest' + - name: "Build Android Example" + run: | + ./.github/workflows/scripts/build-example.sh android + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + ./.github/workflows/scripts/build-example.sh ios + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + flutter config --enable-macos-desktop + ./.github/workflows/scripts/build-example.sh macos + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + flutter config --enable-windows-desktop + ./.github/workflows/scripts/build-example.sh windows + if: matrix.os == 'windows-latest' + + integration_tests: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ubuntu-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Setup Linux" + run: | + sudo apt update + sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format + sudo apt install -y network-manager upower + flutter config --enable-linux-desktop + if: matrix.os == 'ubuntu-latest' + - name: "Bootstrap Workspace" + run: melos bootstrap + - name: "Flutter Integration Test" + run: | + melos run test:mobile_e2e + melos run test:web_e2e + melos run test:linux_e2e + if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/device_info_plus.yaml b/.github/workflows/device_info_plus.yaml new file mode 100644 index 0000000000..71d23bfe6b --- /dev/null +++ b/.github/workflows/device_info_plus.yaml @@ -0,0 +1,97 @@ +name: device_info_plus + +on: + pull_request: + paths: + - "packages/device_info_plus/**" + - ".github/workflows/device_info_plus.yaml" + push: + branches: + - main + paths-ignore: + - "docs/**" + - "**.md" + +defaults: + run: + working-directory: packages/device_info_plus + +env: + PLUS_PLUGIN_SCOPE: "*device_info_plus*" + PLUS_PLUGIN_SCOPE_EXAMPLE: "*device_info_plus_example*" + +jobs: + build: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Build Web Example" + run: | + flutter config --enable-web + ./.github/workflows/scripts/build-example.sh web + if: matrix.os == 'ubuntu-latest' + - name: "Build Linux Example" + run: | + flutter config --enable-linux-desktop + ./.github/workflows/scripts/build-example.sh linux + if: matrix.os == 'ubuntu-latest' + - name: "Build Android Example" + run: | + ./.github/workflows/scripts/build-example.sh android + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + ./.github/workflows/scripts/build-example.sh ios + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + flutter config --enable-macos-desktop + ./.github/workflows/scripts/build-example.sh macos + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + flutter config --enable-windows-desktop + ./.github/workflows/scripts/build-example.sh windows + if: matrix.os == 'windows-latest' + + integration_tests: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ubuntu-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Setup Linux" + run: | + sudo apt update + sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format + sudo apt install -y network-manager upower + flutter config --enable-linux-desktop + if: matrix.os == 'ubuntu-latest' + - name: "Bootstrap Workspace" + run: melos bootstrap + - name: "Flutter Integration Test" + run: | + melos run test:mobile_e2e + melos run test:web_e2e + melos run test:linux_e2e + if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/network_info_plus.yaml b/.github/workflows/network_info_plus.yaml new file mode 100644 index 0000000000..a2bc0f96c4 --- /dev/null +++ b/.github/workflows/network_info_plus.yaml @@ -0,0 +1,97 @@ +name: network_info_plus + +on: + pull_request: + paths: + - "packages/network_info_plus/**" + - ".github/workflows/network_info_plus.yaml" + push: + branches: + - main + paths-ignore: + - "docs/**" + - "**.md" + +defaults: + run: + working-directory: packages/network_info_plus + +env: + PLUS_PLUGIN_SCOPE: "*network_info_plus*" + PLUS_PLUGIN_SCOPE_EXAMPLE: "*network_info_plus_example*" + +jobs: + build: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Build Web Example" + run: | + flutter config --enable-web + ./.github/workflows/scripts/build-example.sh web + if: matrix.os == 'ubuntu-latest' + - name: "Build Linux Example" + run: | + flutter config --enable-linux-desktop + ./.github/workflows/scripts/build-example.sh linux + if: matrix.os == 'ubuntu-latest' + - name: "Build Android Example" + run: | + ./.github/workflows/scripts/build-example.sh android + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + ./.github/workflows/scripts/build-example.sh ios + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + flutter config --enable-macos-desktop + ./.github/workflows/scripts/build-example.sh macos + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + flutter config --enable-windows-desktop + ./.github/workflows/scripts/build-example.sh windows + if: matrix.os == 'windows-latest' + + integration_tests: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ubuntu-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Setup Linux" + run: | + sudo apt update + sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format + sudo apt install -y network-manager upower + flutter config --enable-linux-desktop + if: matrix.os == 'ubuntu-latest' + - name: "Bootstrap Workspace" + run: melos bootstrap + - name: "Flutter Integration Test" + run: | + melos run test:mobile_e2e + melos run test:web_e2e + melos run test:linux_e2e + if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/package_info_plus.yaml b/.github/workflows/package_info_plus.yaml new file mode 100644 index 0000000000..7a780f25ab --- /dev/null +++ b/.github/workflows/package_info_plus.yaml @@ -0,0 +1,97 @@ +name: package_info_plus + +on: + pull_request: + paths: + - "packages/package_info_plus/**" + - ".github/workflows/package_info_plus.yaml" + push: + branches: + - main + paths-ignore: + - "docs/**" + - "**.md" + +defaults: + run: + working-directory: packages/package_info_plus + +env: + PLUS_PLUGIN_SCOPE: "*package_info_plus*" + PLUS_PLUGIN_SCOPE_EXAMPLE: "*package_info_plus_example*" + +jobs: + build: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Build Web Example" + run: | + flutter config --enable-web + ./.github/workflows/scripts/build-example.sh web + if: matrix.os == 'ubuntu-latest' + - name: "Build Linux Example" + run: | + flutter config --enable-linux-desktop + ./.github/workflows/scripts/build-example.sh linux + if: matrix.os == 'ubuntu-latest' + - name: "Build Android Example" + run: | + ./.github/workflows/scripts/build-example.sh android + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + ./.github/workflows/scripts/build-example.sh ios + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + flutter config --enable-macos-desktop + ./.github/workflows/scripts/build-example.sh macos + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + flutter config --enable-windows-desktop + ./.github/workflows/scripts/build-example.sh windows + if: matrix.os == 'windows-latest' + + integration_tests: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ubuntu-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Setup Linux" + run: | + sudo apt update + sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format + sudo apt install -y network-manager upower + flutter config --enable-linux-desktop + if: matrix.os == 'ubuntu-latest' + - name: "Bootstrap Workspace" + run: melos bootstrap + - name: "Flutter Integration Test" + run: | + melos run test:mobile_e2e + melos run test:web_e2e + melos run test:linux_e2e + if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/scripts/build-examples.sh b/.github/workflows/scripts/build-examples.sh index e31526d9c4..e3aff52f0b 100755 --- a/.github/workflows/scripts/build-examples.sh +++ b/.github/workflows/scripts/build-examples.sh @@ -27,13 +27,27 @@ fi if [ "$ACTION" == "macos" ] then melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" -- \ - flutter build macos $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --device-id=macos --dart-define=CI=true + flutter build macos $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --dart-define=CI=true exit fi if [ "$ACTION" == "linux" ] then melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" -- \ - flutter build linux $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --device-id=linux --dart-define=CI=true + flutter build linux $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --dart-define=CI=true + exit +fi + +if [ "$ACTION" == "windows" ] +then + melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" -- \ + flutter build windows $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --dart-define=CI=true + exit +fi + +if [ "$ACTION" == "web" ] +then + melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" -- \ + flutter build web $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --dart-define=CI=true exit fi \ No newline at end of file diff --git a/.github/workflows/sensors_plus.yaml b/.github/workflows/sensors_plus.yaml new file mode 100644 index 0000000000..3b38468687 --- /dev/null +++ b/.github/workflows/sensors_plus.yaml @@ -0,0 +1,80 @@ +name: sensors_plus + +on: + pull_request: + paths: + - "packages/sensors_plus/**" + - ".github/workflows/sensors_plus.yaml" + push: + branches: + - main + paths-ignore: + - "docs/**" + - "**.md" + +defaults: + run: + working-directory: packages/sensors_plus + +env: + PLUS_PLUGIN_SCOPE: "*sensors_plus*" + PLUS_PLUGIN_SCOPE_EXAMPLE: "*sensors_plus_example*" + +jobs: + build: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [macos-latest, ubuntu-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Build Web Example" + run: | + flutter config --enable-web + ./.github/workflows/scripts/build-example.sh web + if: matrix.os == 'ubuntu-latest' + - name: "Build Android Example" + run: | + ./.github/workflows/scripts/build-example.sh android + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + ./.github/workflows/scripts/build-example.sh ios + if: matrix.os == 'macos-latest' + + integration_tests: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ubuntu-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Setup Linux" + run: | + sudo apt update + sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format + sudo apt install -y network-manager upower + if: matrix.os == 'ubuntu-latest' + - name: "Bootstrap Workspace" + run: melos bootstrap + - name: "Flutter Integration Test" + run: | + melos run test:mobile_e2e + melos run test:web_e2e + if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/share_plus.yaml b/.github/workflows/share_plus.yaml new file mode 100644 index 0000000000..362cb93678 --- /dev/null +++ b/.github/workflows/share_plus.yaml @@ -0,0 +1,97 @@ +name: share_plus + +on: + pull_request: + paths: + - "packages/share_plus/**" + - ".github/workflows/share_plus.yaml" + push: + branches: + - main + paths-ignore: + - "docs/**" + - "**.md" + +defaults: + run: + working-directory: packages/share_plus + +env: + PLUS_PLUGIN_SCOPE: "*share_plus*" + PLUS_PLUGIN_SCOPE_EXAMPLE: "*share_plus_example*" + +jobs: + build: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Build Web Example" + run: | + flutter config --enable-web + ./.github/workflows/scripts/build-example.sh web + if: matrix.os == 'ubuntu-latest' + - name: "Build Linux Example" + run: | + flutter config --enable-linux-desktop + ./.github/workflows/scripts/build-example.sh linux + if: matrix.os == 'ubuntu-latest' + - name: "Build Android Example" + run: | + ./.github/workflows/scripts/build-example.sh android + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + ./.github/workflows/scripts/build-example.sh ios + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + flutter config --enable-macos-desktop + ./.github/workflows/scripts/build-example.sh macos + if: matrix.os == 'macos-latest' + - name: "Build Web Example" + run: | + flutter config --enable-windows-desktop + ./.github/workflows/scripts/build-example.sh windows + if: matrix.os == 'windows-latest' + + integration_tests: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ubuntu-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: | + ./.github/workflows/scripts/install-tools.sh + - name: "Setup Linux" + run: | + sudo apt update + sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format + sudo apt install -y network-manager upower + flutter config --enable-linux-desktop + if: matrix.os == 'ubuntu-latest' + - name: "Bootstrap Workspace" + run: melos bootstrap + - name: "Flutter Integration Test" + run: | + melos run test:mobile_e2e + melos run test:web_e2e + melos run test:linux_e2e + if: matrix.os == 'ubuntu-latest' diff --git a/melos.yaml b/melos.yaml index 43dd308178..e61a66bf07 100644 --- a/melos.yaml +++ b/melos.yaml @@ -128,6 +128,14 @@ scripts: - test scope: "*web*" + integration:all: + run: | + melos run test:mobile_e2e --no-select \ + && melos run test:web_e2e --no-select \ + && melos run test:linux_e2e --no-select \ + && melos run test:macos_e2e --no-select + description: Run all integration tests available on stable channel + test:mobile_e2e: run: | melos exec -c 1 --fail-fast -- \ @@ -146,7 +154,7 @@ scripts: "flutter drive --device-id=web-server --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart" description: | Run all Web test driver e2e tests in a specific example app. - - Requires `flutter channel master` (or beta). + - Requires `flutter channel stable` (or beta). - Requires `flutter config --enable-web` set. - Requires chromedriver running on port 4444. select-package: @@ -155,16 +163,13 @@ scripts: - test_driver scope: "*example*" - # Run all Linux test driver e2e tests in the example apps. - # - Requires `flutter config --enable-linux-desktop` enabled. - # - Requires `flutter channel dev && flutter upgrade`. test:linux_e2e: run: | melos exec -c 1 --fail-fast -- \ "flutter drive -d linux --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart" description: | Run all Linux test driver e2e tests in a specific example app. - - Requires `flutter channel master`. + - Requires `flutter channel stable`. - Requires `flutter config --enable-linux-desktop` set. select-package: dir-exists: @@ -178,7 +183,7 @@ scripts: "flutter drive -d macos --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart" description: | Run all MacOS test driver e2e tests in a specific example app. - - Requires `flutter channel master`. + - Requires `flutter channel stable`. - Requires `flutter config --enable-macos-desktop` set. select-package: dir-exists: From e56ec1eee68230c4841e99f63f558d6602da72c0 Mon Sep 17 00:00:00 2001 From: Majid Date: Sat, 2 Oct 2021 16:59:31 +0200 Subject: [PATCH 09/22] remove default directory --- .github/workflows/android_alarm_manager_plus.yaml | 6 +++--- .github/workflows/android_intent_plus.yaml | 6 +++--- .github/workflows/battery_plus.yaml | 6 +++--- .github/workflows/connectivity_plus.yaml | 6 +++--- .github/workflows/device_info_plus.yaml | 6 +++--- .github/workflows/network_info_plus.yaml | 6 +++--- .github/workflows/package_info_plus.yaml | 6 +++--- .github/workflows/sensors_plus.yaml | 6 +++--- .github/workflows/share_plus.yaml | 6 +++--- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/android_alarm_manager_plus.yaml b/.github/workflows/android_alarm_manager_plus.yaml index 15dff60e1b..ecdb7615e9 100644 --- a/.github/workflows/android_alarm_manager_plus.yaml +++ b/.github/workflows/android_alarm_manager_plus.yaml @@ -12,9 +12,9 @@ on: - "docs/**" - "**.md" -defaults: - run: - working-directory: packages/android_alarm_manager_plus +# defaults: +# run: +# working-directory: packages/android_alarm_manager_plus env: PLUS_PLUGIN_SCOPE: "*android_alarm_manager_plus*" diff --git a/.github/workflows/android_intent_plus.yaml b/.github/workflows/android_intent_plus.yaml index a964aa1f1d..ecc49b5615 100644 --- a/.github/workflows/android_intent_plus.yaml +++ b/.github/workflows/android_intent_plus.yaml @@ -12,9 +12,9 @@ on: - "docs/**" - "**.md" -defaults: - run: - working-directory: packages/android_intent_plus +# defaults: +# run: +# working-directory: packages/android_intent_plus env: PLUS_PLUGIN_SCOPE: "*android_intent_plus*" diff --git a/.github/workflows/battery_plus.yaml b/.github/workflows/battery_plus.yaml index dc6d6d25f4..c42e9cedf6 100644 --- a/.github/workflows/battery_plus.yaml +++ b/.github/workflows/battery_plus.yaml @@ -12,9 +12,9 @@ on: - "docs/**" - "**.md" -defaults: - run: - working-directory: packages/battery_plus +# defaults: +# run: +# working-directory: packages/battery_plus env: PLUS_PLUGIN_SCOPE: "*battery_plus*" diff --git a/.github/workflows/connectivity_plus.yaml b/.github/workflows/connectivity_plus.yaml index b860dfe316..8d72d78c23 100644 --- a/.github/workflows/connectivity_plus.yaml +++ b/.github/workflows/connectivity_plus.yaml @@ -12,9 +12,9 @@ on: - "docs/**" - "**.md" -defaults: - run: - working-directory: packages/connectivity_plus +# defaults: +# run: +# working-directory: packages/connectivity_plus env: PLUS_PLUGIN_SCOPE: "*connectivity_plus*" diff --git a/.github/workflows/device_info_plus.yaml b/.github/workflows/device_info_plus.yaml index 71d23bfe6b..502b97e50c 100644 --- a/.github/workflows/device_info_plus.yaml +++ b/.github/workflows/device_info_plus.yaml @@ -12,9 +12,9 @@ on: - "docs/**" - "**.md" -defaults: - run: - working-directory: packages/device_info_plus +# defaults: +# run: +# working-directory: packages/device_info_plus env: PLUS_PLUGIN_SCOPE: "*device_info_plus*" diff --git a/.github/workflows/network_info_plus.yaml b/.github/workflows/network_info_plus.yaml index a2bc0f96c4..51c601e7fd 100644 --- a/.github/workflows/network_info_plus.yaml +++ b/.github/workflows/network_info_plus.yaml @@ -12,9 +12,9 @@ on: - "docs/**" - "**.md" -defaults: - run: - working-directory: packages/network_info_plus +# defaults: +# run: +# working-directory: packages/network_info_plus env: PLUS_PLUGIN_SCOPE: "*network_info_plus*" diff --git a/.github/workflows/package_info_plus.yaml b/.github/workflows/package_info_plus.yaml index 7a780f25ab..56f406fd40 100644 --- a/.github/workflows/package_info_plus.yaml +++ b/.github/workflows/package_info_plus.yaml @@ -12,9 +12,9 @@ on: - "docs/**" - "**.md" -defaults: - run: - working-directory: packages/package_info_plus +# defaults: +# run: +# working-directory: packages/package_info_plus env: PLUS_PLUGIN_SCOPE: "*package_info_plus*" diff --git a/.github/workflows/sensors_plus.yaml b/.github/workflows/sensors_plus.yaml index 3b38468687..6f08749ed7 100644 --- a/.github/workflows/sensors_plus.yaml +++ b/.github/workflows/sensors_plus.yaml @@ -12,9 +12,9 @@ on: - "docs/**" - "**.md" -defaults: - run: - working-directory: packages/sensors_plus +# defaults: +# run: +# working-directory: packages/sensors_plus env: PLUS_PLUGIN_SCOPE: "*sensors_plus*" diff --git a/.github/workflows/share_plus.yaml b/.github/workflows/share_plus.yaml index 362cb93678..505818764c 100644 --- a/.github/workflows/share_plus.yaml +++ b/.github/workflows/share_plus.yaml @@ -12,9 +12,9 @@ on: - "docs/**" - "**.md" -defaults: - run: - working-directory: packages/share_plus +# defaults: +# run: +# working-directory: packages/share_plus env: PLUS_PLUGIN_SCOPE: "*share_plus*" From c7432e68cced9327eaf335e4991b412c517baa02 Mon Sep 17 00:00:00 2001 From: Majid Date: Sat, 2 Oct 2021 17:15:59 +0200 Subject: [PATCH 10/22] add flutter config --- .github/workflows/scripts/build-examples.sh | 6 +++--- .github/workflows/scripts/drive-example.sh | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scripts/build-examples.sh b/.github/workflows/scripts/build-examples.sh index e3aff52f0b..4f1014d6e2 100755 --- a/.github/workflows/scripts/build-examples.sh +++ b/.github/workflows/scripts/build-examples.sh @@ -27,21 +27,21 @@ fi if [ "$ACTION" == "macos" ] then melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" -- \ - flutter build macos $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --dart-define=CI=true + flutter config --enable-macos-desktop && flutter build macos $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --dart-define=CI=true exit fi if [ "$ACTION" == "linux" ] then melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" -- \ - flutter build linux $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --dart-define=CI=true + flutter config --enable-linux-desktop && flutter build linux $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --dart-define=CI=true exit fi if [ "$ACTION" == "windows" ] then melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" -- \ - flutter build windows $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --dart-define=CI=true + flutter config --enable-windows-desktop && flutter build windows $FLUTTER_COMMAND_FLAGS --debug --target="$TARGET_FILE" --dart-define=CI=true exit fi diff --git a/.github/workflows/scripts/drive-example.sh b/.github/workflows/scripts/drive-example.sh index df5ec43270..ce0fe63538 100755 --- a/.github/workflows/scripts/drive-example.sh +++ b/.github/workflows/scripts/drive-example.sh @@ -42,6 +42,13 @@ then exit fi +if [ "$ACTION" == "windows" ] +then + melos exec -c 1 --fail-fast --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" --dir-exists=test_driver -- \ + flutter drive $FLUTTER_COMMAND_FLAGS -d windows --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart --dart-define=CI=true + exit +fi + if [ "$ACTION" == "web" ] then melos bootstrap --scope="$PLUS_PLUGIN_SCOPE" From dcd4adc3b32a0c7c904ebdfbaa4d066f7050d551 Mon Sep 17 00:00:00 2001 From: Majid Date: Sat, 2 Oct 2021 17:17:04 +0200 Subject: [PATCH 11/22] remove package workflow temp --- .../_backup/android_alarm_manager_plus.yaml | 0 .github/_backup/android_intent_plus.yaml | 0 .github/_backup/battery_plus.yaml | 0 .github/_backup/connectivity_plus.yaml | 0 .github/_backup/device_info_plus.yaml | 0 .github/_backup/network_info_plus.yaml | 0 .github/_backup/package_info_plus.yaml | 0 .github/_backup/sensors_plus.yaml | 0 .../{workflows => _backup}/share_plus.yaml | 13 +-- .../workflows/android_alarm_manager_plus.yaml | 64 ------------ .github/workflows/android_intent_plus.yaml | 64 ------------ .github/workflows/battery_plus.yaml | 97 ------------------- .github/workflows/connectivity_plus.yaml | 97 ------------------- .github/workflows/device_info_plus.yaml | 97 ------------------- .github/workflows/network_info_plus.yaml | 97 ------------------- .github/workflows/package_info_plus.yaml | 97 ------------------- .github/workflows/sensors_plus.yaml | 80 --------------- 17 files changed, 4 insertions(+), 702 deletions(-) create mode 100644 .github/_backup/android_alarm_manager_plus.yaml create mode 100644 .github/_backup/android_intent_plus.yaml create mode 100644 .github/_backup/battery_plus.yaml create mode 100644 .github/_backup/connectivity_plus.yaml create mode 100644 .github/_backup/device_info_plus.yaml create mode 100644 .github/_backup/network_info_plus.yaml create mode 100644 .github/_backup/package_info_plus.yaml create mode 100644 .github/_backup/sensors_plus.yaml rename .github/{workflows => _backup}/share_plus.yaml (87%) delete mode 100644 .github/workflows/android_alarm_manager_plus.yaml delete mode 100644 .github/workflows/android_intent_plus.yaml delete mode 100644 .github/workflows/battery_plus.yaml delete mode 100644 .github/workflows/connectivity_plus.yaml delete mode 100644 .github/workflows/device_info_plus.yaml delete mode 100644 .github/workflows/network_info_plus.yaml delete mode 100644 .github/workflows/package_info_plus.yaml delete mode 100644 .github/workflows/sensors_plus.yaml diff --git a/.github/_backup/android_alarm_manager_plus.yaml b/.github/_backup/android_alarm_manager_plus.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/_backup/android_intent_plus.yaml b/.github/_backup/android_intent_plus.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/_backup/battery_plus.yaml b/.github/_backup/battery_plus.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/_backup/connectivity_plus.yaml b/.github/_backup/connectivity_plus.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/_backup/device_info_plus.yaml b/.github/_backup/device_info_plus.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/_backup/network_info_plus.yaml b/.github/_backup/network_info_plus.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/_backup/package_info_plus.yaml b/.github/_backup/package_info_plus.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/_backup/sensors_plus.yaml b/.github/_backup/sensors_plus.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.github/workflows/share_plus.yaml b/.github/_backup/share_plus.yaml similarity index 87% rename from .github/workflows/share_plus.yaml rename to .github/_backup/share_plus.yaml index 505818764c..424e06beda 100644 --- a/.github/workflows/share_plus.yaml +++ b/.github/_backup/share_plus.yaml @@ -38,12 +38,10 @@ jobs: ./.github/workflows/scripts/install-tools.sh - name: "Build Web Example" run: | - flutter config --enable-web ./.github/workflows/scripts/build-example.sh web if: matrix.os == 'ubuntu-latest' - name: "Build Linux Example" run: | - flutter config --enable-linux-desktop ./.github/workflows/scripts/build-example.sh linux if: matrix.os == 'ubuntu-latest' - name: "Build Android Example" @@ -56,12 +54,10 @@ jobs: if: matrix.os == 'macos-latest' - name: "Build Web Example" run: | - flutter config --enable-macos-desktop ./.github/workflows/scripts/build-example.sh macos if: matrix.os == 'macos-latest' - name: "Build Web Example" run: | - flutter config --enable-windows-desktop ./.github/workflows/scripts/build-example.sh windows if: matrix.os == 'windows-latest' @@ -78,8 +74,7 @@ jobs: - name: "Install Flutter" run: ./.github/workflows/scripts/install-flutter.sh stable - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh + run: ./.github/workflows/scripts/install-tools.sh - name: "Setup Linux" run: | sudo apt update @@ -91,7 +86,7 @@ jobs: run: melos bootstrap - name: "Flutter Integration Test" run: | - melos run test:mobile_e2e - melos run test:web_e2e - melos run test:linux_e2e + melos run test:mobile_e2e --no-select + melos run test:web_e2e --no-select + melos run test:linux_e2e --no-select if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/android_alarm_manager_plus.yaml b/.github/workflows/android_alarm_manager_plus.yaml deleted file mode 100644 index ecdb7615e9..0000000000 --- a/.github/workflows/android_alarm_manager_plus.yaml +++ /dev/null @@ -1,64 +0,0 @@ -name: android_alarm_manager_plus - -on: - pull_request: - paths: - - "packages/android_alarm_manager_plus/**" - - ".github/workflows/android_alarm_manager_plus.yaml" - push: - branches: - - main - paths-ignore: - - "docs/**" - - "**.md" - -# defaults: -# run: -# working-directory: packages/android_alarm_manager_plus - -env: - PLUS_PLUGIN_SCOPE: "*android_alarm_manager_plus*" - PLUS_PLUGIN_SCOPE_EXAMPLE: "*android_alarm_manager_plus_example*" - -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Build Android Example" - run: | - ./.github/workflows/scripts/build-example.sh android - if: matrix.os == 'macos-latest' - - integration_tests: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Setup Linux" - run: | - sudo apt update - sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format - sudo apt install -y network-manager upower - flutter config --enable-linux-desktop - if: matrix.os == 'ubuntu-latest' - - name: "Bootstrap Workspace" - run: melos bootstrap - - name: "Flutter Integration Test" - run: | - melos run test:linux_e2e diff --git a/.github/workflows/android_intent_plus.yaml b/.github/workflows/android_intent_plus.yaml deleted file mode 100644 index ecc49b5615..0000000000 --- a/.github/workflows/android_intent_plus.yaml +++ /dev/null @@ -1,64 +0,0 @@ -name: android_intent_plus - -on: - pull_request: - paths: - - "packages/android_intent_plus/**" - - ".github/workflows/android_intent_plus.yaml" - push: - branches: - - main - paths-ignore: - - "docs/**" - - "**.md" - -# defaults: -# run: -# working-directory: packages/android_intent_plus - -env: - PLUS_PLUGIN_SCOPE: "*android_intent_plus*" - PLUS_PLUGIN_SCOPE_EXAMPLE: "*android_intent_plus_example*" - -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Build Android Example" - run: | - ./.github/workflows/scripts/build-example.sh android - if: matrix.os == 'macos-latest' - - integration_tests: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Setup Linux" - run: | - sudo apt update - sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format - sudo apt install -y network-manager upower - flutter config --enable-linux-desktop - if: matrix.os == 'ubuntu-latest' - - name: "Bootstrap Workspace" - run: melos bootstrap - - name: "Flutter Integration Test" - run: | - melos run test:linux_e2e diff --git a/.github/workflows/battery_plus.yaml b/.github/workflows/battery_plus.yaml deleted file mode 100644 index c42e9cedf6..0000000000 --- a/.github/workflows/battery_plus.yaml +++ /dev/null @@ -1,97 +0,0 @@ -name: battery_plus - -on: - pull_request: - paths: - - "packages/battery_plus/**" - - ".github/workflows/battery_plus.yaml" - push: - branches: - - main - paths-ignore: - - "docs/**" - - "**.md" - -# defaults: -# run: -# working-directory: packages/battery_plus - -env: - PLUS_PLUGIN_SCOPE: "*battery_plus*" - PLUS_PLUGIN_SCOPE_EXAMPLE: "*battery_plus_example*" - -jobs: - build: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Build Web Example" - run: | - flutter config --enable-web - ./.github/workflows/scripts/build-example.sh web - if: matrix.os == 'ubuntu-latest' - - name: "Build Linux Example" - run: | - flutter config --enable-linux-desktop - ./.github/workflows/scripts/build-example.sh linux - if: matrix.os == 'ubuntu-latest' - - name: "Build Android Example" - run: | - ./.github/workflows/scripts/build-example.sh android - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - ./.github/workflows/scripts/build-example.sh ios - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - flutter config --enable-macos-desktop - ./.github/workflows/scripts/build-example.sh macos - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - flutter config --enable-windows-desktop - ./.github/workflows/scripts/build-example.sh windows - if: matrix.os == 'windows-latest' - - integration_tests: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [ubuntu-latest] - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Setup Linux" - run: | - sudo apt update - sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format - sudo apt install -y network-manager upower - flutter config --enable-linux-desktop - if: matrix.os == 'ubuntu-latest' - - name: "Bootstrap Workspace" - run: melos bootstrap - - name: "Flutter Integration Test" - run: | - melos run test:mobile_e2e - melos run test:web_e2e - melos run test:linux_e2e - if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/connectivity_plus.yaml b/.github/workflows/connectivity_plus.yaml deleted file mode 100644 index 8d72d78c23..0000000000 --- a/.github/workflows/connectivity_plus.yaml +++ /dev/null @@ -1,97 +0,0 @@ -name: connectivity_plus - -on: - pull_request: - paths: - - "packages/connectivity_plus/**" - - ".github/workflows/connectivity_plus.yaml" - push: - branches: - - main - paths-ignore: - - "docs/**" - - "**.md" - -# defaults: -# run: -# working-directory: packages/connectivity_plus - -env: - PLUS_PLUGIN_SCOPE: "*connectivity_plus*" - PLUS_PLUGIN_SCOPE_EXAMPLE: "*connectivity_plus_example*" - -jobs: - build: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Build Web Example" - run: | - flutter config --enable-web - ./.github/workflows/scripts/build-example.sh web - if: matrix.os == 'ubuntu-latest' - - name: "Build Linux Example" - run: | - flutter config --enable-linux-desktop - ./.github/workflows/scripts/build-example.sh linux - if: matrix.os == 'ubuntu-latest' - - name: "Build Android Example" - run: | - ./.github/workflows/scripts/build-example.sh android - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - ./.github/workflows/scripts/build-example.sh ios - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - flutter config --enable-macos-desktop - ./.github/workflows/scripts/build-example.sh macos - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - flutter config --enable-windows-desktop - ./.github/workflows/scripts/build-example.sh windows - if: matrix.os == 'windows-latest' - - integration_tests: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [ubuntu-latest] - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Setup Linux" - run: | - sudo apt update - sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format - sudo apt install -y network-manager upower - flutter config --enable-linux-desktop - if: matrix.os == 'ubuntu-latest' - - name: "Bootstrap Workspace" - run: melos bootstrap - - name: "Flutter Integration Test" - run: | - melos run test:mobile_e2e - melos run test:web_e2e - melos run test:linux_e2e - if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/device_info_plus.yaml b/.github/workflows/device_info_plus.yaml deleted file mode 100644 index 502b97e50c..0000000000 --- a/.github/workflows/device_info_plus.yaml +++ /dev/null @@ -1,97 +0,0 @@ -name: device_info_plus - -on: - pull_request: - paths: - - "packages/device_info_plus/**" - - ".github/workflows/device_info_plus.yaml" - push: - branches: - - main - paths-ignore: - - "docs/**" - - "**.md" - -# defaults: -# run: -# working-directory: packages/device_info_plus - -env: - PLUS_PLUGIN_SCOPE: "*device_info_plus*" - PLUS_PLUGIN_SCOPE_EXAMPLE: "*device_info_plus_example*" - -jobs: - build: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Build Web Example" - run: | - flutter config --enable-web - ./.github/workflows/scripts/build-example.sh web - if: matrix.os == 'ubuntu-latest' - - name: "Build Linux Example" - run: | - flutter config --enable-linux-desktop - ./.github/workflows/scripts/build-example.sh linux - if: matrix.os == 'ubuntu-latest' - - name: "Build Android Example" - run: | - ./.github/workflows/scripts/build-example.sh android - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - ./.github/workflows/scripts/build-example.sh ios - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - flutter config --enable-macos-desktop - ./.github/workflows/scripts/build-example.sh macos - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - flutter config --enable-windows-desktop - ./.github/workflows/scripts/build-example.sh windows - if: matrix.os == 'windows-latest' - - integration_tests: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [ubuntu-latest] - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Setup Linux" - run: | - sudo apt update - sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format - sudo apt install -y network-manager upower - flutter config --enable-linux-desktop - if: matrix.os == 'ubuntu-latest' - - name: "Bootstrap Workspace" - run: melos bootstrap - - name: "Flutter Integration Test" - run: | - melos run test:mobile_e2e - melos run test:web_e2e - melos run test:linux_e2e - if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/network_info_plus.yaml b/.github/workflows/network_info_plus.yaml deleted file mode 100644 index 51c601e7fd..0000000000 --- a/.github/workflows/network_info_plus.yaml +++ /dev/null @@ -1,97 +0,0 @@ -name: network_info_plus - -on: - pull_request: - paths: - - "packages/network_info_plus/**" - - ".github/workflows/network_info_plus.yaml" - push: - branches: - - main - paths-ignore: - - "docs/**" - - "**.md" - -# defaults: -# run: -# working-directory: packages/network_info_plus - -env: - PLUS_PLUGIN_SCOPE: "*network_info_plus*" - PLUS_PLUGIN_SCOPE_EXAMPLE: "*network_info_plus_example*" - -jobs: - build: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Build Web Example" - run: | - flutter config --enable-web - ./.github/workflows/scripts/build-example.sh web - if: matrix.os == 'ubuntu-latest' - - name: "Build Linux Example" - run: | - flutter config --enable-linux-desktop - ./.github/workflows/scripts/build-example.sh linux - if: matrix.os == 'ubuntu-latest' - - name: "Build Android Example" - run: | - ./.github/workflows/scripts/build-example.sh android - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - ./.github/workflows/scripts/build-example.sh ios - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - flutter config --enable-macos-desktop - ./.github/workflows/scripts/build-example.sh macos - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - flutter config --enable-windows-desktop - ./.github/workflows/scripts/build-example.sh windows - if: matrix.os == 'windows-latest' - - integration_tests: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [ubuntu-latest] - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Setup Linux" - run: | - sudo apt update - sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format - sudo apt install -y network-manager upower - flutter config --enable-linux-desktop - if: matrix.os == 'ubuntu-latest' - - name: "Bootstrap Workspace" - run: melos bootstrap - - name: "Flutter Integration Test" - run: | - melos run test:mobile_e2e - melos run test:web_e2e - melos run test:linux_e2e - if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/package_info_plus.yaml b/.github/workflows/package_info_plus.yaml deleted file mode 100644 index 56f406fd40..0000000000 --- a/.github/workflows/package_info_plus.yaml +++ /dev/null @@ -1,97 +0,0 @@ -name: package_info_plus - -on: - pull_request: - paths: - - "packages/package_info_plus/**" - - ".github/workflows/package_info_plus.yaml" - push: - branches: - - main - paths-ignore: - - "docs/**" - - "**.md" - -# defaults: -# run: -# working-directory: packages/package_info_plus - -env: - PLUS_PLUGIN_SCOPE: "*package_info_plus*" - PLUS_PLUGIN_SCOPE_EXAMPLE: "*package_info_plus_example*" - -jobs: - build: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Build Web Example" - run: | - flutter config --enable-web - ./.github/workflows/scripts/build-example.sh web - if: matrix.os == 'ubuntu-latest' - - name: "Build Linux Example" - run: | - flutter config --enable-linux-desktop - ./.github/workflows/scripts/build-example.sh linux - if: matrix.os == 'ubuntu-latest' - - name: "Build Android Example" - run: | - ./.github/workflows/scripts/build-example.sh android - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - ./.github/workflows/scripts/build-example.sh ios - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - flutter config --enable-macos-desktop - ./.github/workflows/scripts/build-example.sh macos - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - flutter config --enable-windows-desktop - ./.github/workflows/scripts/build-example.sh windows - if: matrix.os == 'windows-latest' - - integration_tests: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [ubuntu-latest] - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Setup Linux" - run: | - sudo apt update - sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format - sudo apt install -y network-manager upower - flutter config --enable-linux-desktop - if: matrix.os == 'ubuntu-latest' - - name: "Bootstrap Workspace" - run: melos bootstrap - - name: "Flutter Integration Test" - run: | - melos run test:mobile_e2e - melos run test:web_e2e - melos run test:linux_e2e - if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/sensors_plus.yaml b/.github/workflows/sensors_plus.yaml deleted file mode 100644 index 6f08749ed7..0000000000 --- a/.github/workflows/sensors_plus.yaml +++ /dev/null @@ -1,80 +0,0 @@ -name: sensors_plus - -on: - pull_request: - paths: - - "packages/sensors_plus/**" - - ".github/workflows/sensors_plus.yaml" - push: - branches: - - main - paths-ignore: - - "docs/**" - - "**.md" - -# defaults: -# run: -# working-directory: packages/sensors_plus - -env: - PLUS_PLUGIN_SCOPE: "*sensors_plus*" - PLUS_PLUGIN_SCOPE_EXAMPLE: "*sensors_plus_example*" - -jobs: - build: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [macos-latest, ubuntu-latest] - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Build Web Example" - run: | - flutter config --enable-web - ./.github/workflows/scripts/build-example.sh web - if: matrix.os == 'ubuntu-latest' - - name: "Build Android Example" - run: | - ./.github/workflows/scripts/build-example.sh android - if: matrix.os == 'macos-latest' - - name: "Build Web Example" - run: | - ./.github/workflows/scripts/build-example.sh ios - if: matrix.os == 'macos-latest' - - integration_tests: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [ubuntu-latest] - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - name: "Install Flutter" - run: ./.github/workflows/scripts/install-flutter.sh stable - - name: "Install Tools" - run: | - ./.github/workflows/scripts/install-tools.sh - - name: "Setup Linux" - run: | - sudo apt update - sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format - sudo apt install -y network-manager upower - if: matrix.os == 'ubuntu-latest' - - name: "Bootstrap Workspace" - run: melos bootstrap - - name: "Flutter Integration Test" - run: | - melos run test:mobile_e2e - melos run test:web_e2e - if: matrix.os == 'ubuntu-latest' From 954e9e43eda4ee433faabd2a93a97ab5fcc73589 Mon Sep 17 00:00:00 2001 From: Majid Date: Sun, 3 Oct 2021 12:10:36 +0200 Subject: [PATCH 12/22] add integration test --- .github/workflows/all_plugins.yaml | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index 537b2f6c39..9efc08929e 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -130,3 +130,40 @@ jobs: with: token: ${{secrets.CODECOV_TOKEN}} files: packages/*/coverage/lcov.info + + integration_tests: + if: false # currently broken, see issue 220 + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ubuntu-latest] + timeout-minutes: 15 + steps: + - uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + - name: "Install Flutter" + run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" + run: ./.github/workflows/scripts/install-tools.sh + - name: "Bootstrap Workspace" + run: melos bootstrap + - uses: actions/checkout@v2 + - uses: nanasess/setup-chromedriver@master + with: + chromedriver-version: "95.0.4638.17" + - run: | + export DISPLAY=:99 + chromedriver --url-base=/wd/hub & + sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional + chromedriver --port=4444 + - name: "Setup Linux" + run: | + sudo apt update + sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format + sudo apt install -y network-manager upower + if: matrix.os == 'ubuntu-latest' + - name: "Flutter Integration Test" + run: | + melos run test:web_e2e --no-select + if: matrix.os == 'ubuntu-latest' From ffffb3ece20e0d8ebc9ae21ca3d6e9402fa21e68 Mon Sep 17 00:00:00 2001 From: Majid Date: Sun, 3 Oct 2021 12:17:10 +0200 Subject: [PATCH 13/22] disbale integration test --- .github/_backup/share_plus.yaml | 1 + .github/workflows/all_plugins.yaml | 2 +- melos.yaml | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/_backup/share_plus.yaml b/.github/_backup/share_plus.yaml index 424e06beda..a8a205120c 100644 --- a/.github/_backup/share_plus.yaml +++ b/.github/_backup/share_plus.yaml @@ -62,6 +62,7 @@ jobs: if: matrix.os == 'windows-latest' integration_tests: + if: false # currently broken, see issue 220 runs-on: ${{matrix.os}} strategy: matrix: diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index 9efc08929e..745c710525 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -151,7 +151,7 @@ jobs: - uses: actions/checkout@v2 - uses: nanasess/setup-chromedriver@master with: - chromedriver-version: "95.0.4638.17" + chromedriver-version: "94.0.4606.61" - run: | export DISPLAY=:99 chromedriver --url-base=/wd/hub & diff --git a/melos.yaml b/melos.yaml index e61a66bf07..88c0e68852 100644 --- a/melos.yaml +++ b/melos.yaml @@ -154,8 +154,7 @@ scripts: "flutter drive --device-id=web-server --no-pub --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart" description: | Run all Web test driver e2e tests in a specific example app. - - Requires `flutter channel stable` (or beta). - - Requires `flutter config --enable-web` set. + - Requires `flutter channel stable`. - Requires chromedriver running on port 4444. select-package: dir-exists: From 5423990f4d2d3e6eaf5d3ee2322d20fae13a7d86 Mon Sep 17 00:00:00 2001 From: Majid Date: Sun, 3 Oct 2021 20:15:13 +0200 Subject: [PATCH 14/22] update workflow --- .github/workflows/all_plugins.yaml | 89 ++++++++++++++++++---- .github/workflows/scripts/drive-example.sh | 2 +- melos.yaml | 46 ++++++++++- 3 files changed, 117 insertions(+), 20 deletions(-) diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index 745c710525..5b6c792684 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -55,7 +55,7 @@ jobs: format: runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 40 steps: - uses: actions/checkout@v2.3.4 with: @@ -87,8 +87,11 @@ jobs: ./.github/workflows/scripts/validate-formatting.sh build_examples_dart: - timeout-minutes: 15 - runs-on: ubuntu-latest + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + timeout-minutes: 40 steps: - uses: actions/checkout@v2.3.4 with: @@ -98,33 +101,50 @@ jobs: - name: "Install Tools" run: | ./.github/workflows/scripts/install-tools.sh - flutter config --enable-web - name: "Bootstrap Workspace" run: melos bootstrap - - name: "Build Examples" - run: | - melos exec -c 1 --scope="*example*" --dir-exists="web" -- \ - "flutter build web --no-pub" + + - name: "Build iOs,Android, and web Examples" + run: melos run build:all + + - name: "Build Linux Examples" + run: melos run build:example_linux + if: matrix.os == 'ubuntu-latest' + + - name: "Build windows Examples" + run: melos run build:example_windows + if: matrix.os == 'windows-latest' + + - name: "Build macos Examples" + run: melos run build:example_macos + if: matrix.os == 'macos-latest' test_and_coverage: runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 40 steps: - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 + - name: "Install Flutter" run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" run: ./.github/workflows/scripts/install-tools.sh + - name: "Bootstrap Workspace" run: melos bootstrap + - name: "Flutter Test" run: melos run test --no-select + - name: "Flutter Test - Web" run: melos run test:web --no-select + - name: "Collect Coverage" run: melos run coverage + - name: Upload Coverage uses: codecov/codecov-action@v1 with: @@ -132,38 +152,77 @@ jobs: files: packages/*/coverage/lcov.info integration_tests: - if: false # currently broken, see issue 220 + # if: false # currently broken, see issue 220 runs-on: ${{matrix.os}} strategy: matrix: - os: [ubuntu-latest] - timeout-minutes: 15 + os: [macos-latest, ubuntu-latest, windows-latest] + timeout-minutes: 40 steps: - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 + - name: "Install Flutter" run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" run: ./.github/workflows/scripts/install-tools.sh + - name: "Bootstrap Workspace" run: melos bootstrap - - uses: actions/checkout@v2 + - uses: nanasess/setup-chromedriver@master with: chromedriver-version: "94.0.4606.61" + - run: | export DISPLAY=:99 chromedriver --url-base=/wd/hub & sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional chromedriver --port=4444 + - name: "Setup Linux" run: | sudo apt update sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb clang-format sudo apt install -y network-manager upower if: matrix.os == 'ubuntu-latest' - - name: "Flutter Integration Test" + + - name: "Flutter Linux Integration Test" run: | - melos run test:web_e2e --no-select + flutter config --enable-linux-desktop + ./.github/workflows/scripts/drive-example.sh linux + if: matrix.os == 'ubuntu-latest' + + - name: "Drive Android Integration Test" if: matrix.os == 'ubuntu-latest' + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 30 + arch: x86_64 + target: google_apis + profile: Nexus 5X + script: ./.github/workflows/scripts/drive-example.sh android + + - name: "Flutter Windows Integration Test" + run: | + flutter config --enable-windows-desktop + ./.github/workflows/scripts/drive-example.sh windows + if: matrix.os == 'windows-latest' + + - name: "Drive iOS Integration Test" + run: | + ./.github/workflows/scripts/drive-example.sh ios + if: matrix.os == 'macos-latest' + + - name: "Drive MacOS Integration Test" + run: | + flutter config --enable-macos-desktop + ./.github/workflows/scripts/drive-example.sh macos + if: matrix.os == 'macos-latest' + + - name: "Drive Web Integration Test" + run: | + ./.github/workflows/scripts/drive-example.sh web + if: matrix.os == 'linux-latest' diff --git a/.github/workflows/scripts/drive-example.sh b/.github/workflows/scripts/drive-example.sh index ce0fe63538..c8690dac46 100755 --- a/.github/workflows/scripts/drive-example.sh +++ b/.github/workflows/scripts/drive-example.sh @@ -51,8 +51,8 @@ fi if [ "$ACTION" == "web" ] then + # make sure chomredive on port 4444 is running before running this script melos bootstrap --scope="$PLUS_PLUGIN_SCOPE" - chromedriver --port=4444 & melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" --dir-exists=web -- \ flutter drive $FLUTTER_COMMAND_FLAGS --no-pub --verbose-system-logs --device-id=web-server --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart --dart-define=CI=true exit diff --git a/melos.yaml b/melos.yaml index 88c0e68852..415e0c631c 100644 --- a/melos.yaml +++ b/melos.yaml @@ -35,7 +35,10 @@ scripts: build:all: run: | - melos run build:example_ios_pub --no-select && melos run build:example_android_pub --no-select && melos run build:example_macos --no-select && melos bootstrap + melos bootstrap + melos run build:example_ios_pub --no-select + melos run build:example_android_pub --no-select + melos run build:example_web --no-select description: Build all example apps build:example_ios: @@ -72,9 +75,6 @@ scripts: - android scope: "*example*" - # 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. build:example_android_pub: run: | melos exec -c 6 --fail-fast -- \ @@ -98,6 +98,44 @@ scripts: - macos scope: "*example*" + build:example_linux: + run: | + melos exec -c 6 --fail-fast -- \ + "flutter build linux --no-pub" + description: | + Build a specific example app for web. + - Requires `flutter channel stable`. + - Requires `flutter config --enable-linux-desktop` set. + select-package: + dir-exists: + - linux + scope: "*example*" + + build:example_windows: + run: | + melos exec -c 6 --fail-fast -- \ + "flutter build windows --no-pub" + description: | + Build a specific example app for windows. + - Requires `flutter channel stable`. + - Requires `flutter config --enable-windows-desktop` set. + select-package: + dir-exists: + - windows + scope: "*example*" + + build:example_web: + run: | + melos exec -c 6 --fail-fast -- \ + "flutter build web --no-pub" + description: | + Build a specific example app for web. + - Requires `flutter channel stable`. + select-package: + dir-exists: + - web + scope: "*example*" + test:all: run: melos run test --no-select && melos run test:mobile_e2e --no-select description: Run all tests available on stable channel From 7ffd22a9ca0a7e0773fd832c0b937dc17842b06d Mon Sep 17 00:00:00 2001 From: Majid Date: Sun, 3 Oct 2021 20:25:15 +0200 Subject: [PATCH 15/22] ignore strategy for integraitontest --- .github/workflows/all_plugins.yaml | 36 +++++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index 5b6c792684..86e5726ff4 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -90,17 +90,20 @@ jobs: runs-on: ${{matrix.os}} strategy: matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + os: [macos-latest, ubuntu-latest] timeout-minutes: 40 steps: - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 + - name: "Install Flutter" run: ./.github/workflows/scripts/install-flutter.sh stable + - name: "Install Tools" run: | ./.github/workflows/scripts/install-tools.sh + - name: "Bootstrap Workspace" run: melos bootstrap @@ -108,15 +111,19 @@ jobs: run: melos run build:all - name: "Build Linux Examples" - run: melos run build:example_linux + run: | + flutter config --enable-linux-desktop + melos run build:example_linux if: matrix.os == 'ubuntu-latest' - - name: "Build windows Examples" - run: melos run build:example_windows - if: matrix.os == 'windows-latest' + # - name: "Build windows Examples" + # run: melos run build:example_windows + # if: matrix.os == 'windows-latest' - name: "Build macos Examples" - run: melos run build:example_macos + run: | + flutter config --enable-macos-desktop + melos run build:example_macos if: matrix.os == 'macos-latest' test_and_coverage: @@ -153,10 +160,7 @@ jobs: integration_tests: # if: false # currently broken, see issue 220 - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + runs-on: macos-latest timeout-minutes: 40 steps: - uses: actions/checkout@v2.3.4 @@ -196,7 +200,7 @@ jobs: if: matrix.os == 'ubuntu-latest' - name: "Drive Android Integration Test" - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'macos-latest' uses: reactivecircus/android-emulator-runner@v2 with: api-level: 30 @@ -205,11 +209,11 @@ jobs: profile: Nexus 5X script: ./.github/workflows/scripts/drive-example.sh android - - name: "Flutter Windows Integration Test" - run: | - flutter config --enable-windows-desktop - ./.github/workflows/scripts/drive-example.sh windows - if: matrix.os == 'windows-latest' + # - name: "Flutter Windows Integration Test" + # run: | + # flutter config --enable-windows-desktop + # ./.github/workflows/scripts/drive-example.sh windows + # if: matrix.os == 'windows-latest' - name: "Drive iOS Integration Test" run: | From d781180d2421660410bd80cb11154509ab7f611e Mon Sep 17 00:00:00 2001 From: Majid Date: Sun, 3 Oct 2021 20:52:45 +0200 Subject: [PATCH 16/22] update ci --- .github/workflows/all_plugins.yaml | 9 ++------- .github/workflows/scripts/drive-example.sh | 3 +-- melos.yaml | 8 -------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index 86e5726ff4..2588a20a87 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -109,6 +109,7 @@ jobs: - name: "Build iOs,Android, and web Examples" run: melos run build:all + if: matrix.os == 'macos-latest' - name: "Build Linux Examples" run: | @@ -159,7 +160,7 @@ jobs: files: packages/*/coverage/lcov.info integration_tests: - # if: false # currently broken, see issue 220 + if: false # currently broken, see issue 220 runs-on: macos-latest timeout-minutes: 40 steps: @@ -180,12 +181,6 @@ jobs: with: chromedriver-version: "94.0.4606.61" - - run: | - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional - chromedriver --port=4444 - - name: "Setup Linux" run: | sudo apt update diff --git a/.github/workflows/scripts/drive-example.sh b/.github/workflows/scripts/drive-example.sh index c8690dac46..0cbfa69710 100755 --- a/.github/workflows/scripts/drive-example.sh +++ b/.github/workflows/scripts/drive-example.sh @@ -51,9 +51,8 @@ fi if [ "$ACTION" == "web" ] then - # make sure chomredive on port 4444 is running before running this script melos bootstrap --scope="$PLUS_PLUGIN_SCOPE" - melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" --dir-exists=web -- \ + chromedriver --port=4444 & melos exec -c 1 --scope="$PLUS_PLUGIN_SCOPE_EXAMPLE" --dir-exists=web -- \ flutter drive $FLUTTER_COMMAND_FLAGS --no-pub --verbose-system-logs --device-id=web-server --target=./test_driver/MELOS_PARENT_PACKAGE_NAME_e2e.dart --dart-define=CI=true exit fi \ No newline at end of file diff --git a/melos.yaml b/melos.yaml index 415e0c631c..89f5190044 100644 --- a/melos.yaml +++ b/melos.yaml @@ -166,14 +166,6 @@ scripts: - test scope: "*web*" - integration:all: - run: | - melos run test:mobile_e2e --no-select \ - && melos run test:web_e2e --no-select \ - && melos run test:linux_e2e --no-select \ - && melos run test:macos_e2e --no-select - description: Run all integration tests available on stable channel - test:mobile_e2e: run: | melos exec -c 1 --fail-fast -- \ From a121a9a4f03a130226ca96fd25bd9e245f49a05d Mon Sep 17 00:00:00 2001 From: Majid Date: Sun, 3 Oct 2021 20:58:36 +0200 Subject: [PATCH 17/22] add --no-select --- .github/workflows/all_plugins.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index 2588a20a87..7e7f6687b3 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -114,7 +114,7 @@ jobs: - name: "Build Linux Examples" run: | flutter config --enable-linux-desktop - melos run build:example_linux + melos run build:example_linux --no-select if: matrix.os == 'ubuntu-latest' # - name: "Build windows Examples" @@ -124,7 +124,7 @@ jobs: - name: "Build macos Examples" run: | flutter config --enable-macos-desktop - melos run build:example_macos + melos run build:example_macos --no-select if: matrix.os == 'macos-latest' test_and_coverage: From e3f97b35856b1990cfa7150d39fa35a1380236d9 Mon Sep 17 00:00:00 2001 From: Majid Date: Sun, 3 Oct 2021 21:06:30 +0200 Subject: [PATCH 18/22] disable linux and windows --- .github/workflows/all_plugins.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index 7e7f6687b3..f30d76b54f 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -90,7 +90,7 @@ jobs: runs-on: ${{matrix.os}} strategy: matrix: - os: [macos-latest, ubuntu-latest] + os: [macos-latest] timeout-minutes: 40 steps: - uses: actions/checkout@v2.3.4 @@ -111,11 +111,11 @@ jobs: run: melos run build:all if: matrix.os == 'macos-latest' - - name: "Build Linux Examples" - run: | - flutter config --enable-linux-desktop - melos run build:example_linux --no-select - if: matrix.os == 'ubuntu-latest' + # - name: "Build Linux Examples" + # run: | + # flutter config --enable-linux-desktop + # melos run build:example_linux --no-select + # if: matrix.os == 'ubuntu-latest' # - name: "Build windows Examples" # run: melos run build:example_windows From eb17169b7c6f4a947a7cc5292355be0fea49702b Mon Sep 17 00:00:00 2001 From: Majid Date: Sun, 3 Oct 2021 21:14:45 +0200 Subject: [PATCH 19/22] for now run only on macos-latest --- .github/workflows/all_plugins.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index f30d76b54f..85a78cd386 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -87,10 +87,7 @@ jobs: ./.github/workflows/scripts/validate-formatting.sh build_examples_dart: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: [macos-latest] + runs-on: macos-latest timeout-minutes: 40 steps: - uses: actions/checkout@v2.3.4 From 7e1913ad295ae859ba312d0af80362c485de7d93 Mon Sep 17 00:00:00 2001 From: Majid Date: Sun, 3 Oct 2021 21:34:22 +0200 Subject: [PATCH 20/22] remove if --- .github/workflows/all_plugins.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index 85a78cd386..1dbdafda93 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -87,7 +87,10 @@ jobs: ./.github/workflows/scripts/validate-formatting.sh build_examples_dart: - runs-on: macos-latest + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] timeout-minutes: 40 steps: - uses: actions/checkout@v2.3.4 @@ -106,7 +109,6 @@ jobs: - name: "Build iOs,Android, and web Examples" run: melos run build:all - if: matrix.os == 'macos-latest' # - name: "Build Linux Examples" # run: | @@ -122,7 +124,6 @@ jobs: run: | flutter config --enable-macos-desktop melos run build:example_macos --no-select - if: matrix.os == 'macos-latest' test_and_coverage: runs-on: ubuntu-latest From 16af2ad5aa82cae2665183001ab056877d55c331 Mon Sep 17 00:00:00 2001 From: Majid Date: Sun, 3 Oct 2021 21:45:32 +0200 Subject: [PATCH 21/22] keep only macos --- .github/workflows/all_plugins.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index 1dbdafda93..f30d76b54f 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -90,7 +90,7 @@ jobs: runs-on: ${{matrix.os}} strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [macos-latest] timeout-minutes: 40 steps: - uses: actions/checkout@v2.3.4 @@ -109,6 +109,7 @@ jobs: - name: "Build iOs,Android, and web Examples" run: melos run build:all + if: matrix.os == 'macos-latest' # - name: "Build Linux Examples" # run: | @@ -124,6 +125,7 @@ jobs: run: | flutter config --enable-macos-desktop melos run build:example_macos --no-select + if: matrix.os == 'macos-latest' test_and_coverage: runs-on: ubuntu-latest From 03d8ec8275680f0baf71bc0c7829006e31be4744 Mon Sep 17 00:00:00 2001 From: Majid Date: Sun, 3 Oct 2021 22:23:00 +0200 Subject: [PATCH 22/22] fix comments --- .github/workflows/all_plugins.yaml | 10 +++++----- .github/workflows/scripts/install-tools.sh | 1 + melos.yaml | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index f30d76b54f..a04ca9d412 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -121,11 +121,11 @@ jobs: # run: melos run build:example_windows # if: matrix.os == 'windows-latest' - - name: "Build macos Examples" - run: | - flutter config --enable-macos-desktop - melos run build:example_macos --no-select - if: matrix.os == 'macos-latest' + # - name: "Build macos Examples" + # run: | + # flutter config --enable-macos-desktop + # melos run build:example_macos --no-select + # if: matrix.os == 'macos-latest' test_and_coverage: runs-on: ubuntu-latest diff --git a/.github/workflows/scripts/install-tools.sh b/.github/workflows/scripts/install-tools.sh index da75d3b16f..1317d4e3f8 100755 --- a/.github/workflows/scripts/install-tools.sh +++ b/.github/workflows/scripts/install-tools.sh @@ -2,6 +2,7 @@ flutter config --no-analytics flutter pub global activate melos +dart pub global run flutter_plugin_tools format echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH echo "$GITHUB_WORKSPACE/_flutter/.pub-cache/bin" >> $GITHUB_PATH echo "$GITHUB_WORKSPACE/_flutter/bin/cache/dart-sdk/bin" >> $GITHUB_PATH \ No newline at end of file diff --git a/melos.yaml b/melos.yaml index 89f5190044..577e4f96ee 100644 --- a/melos.yaml +++ b/melos.yaml @@ -29,7 +29,7 @@ scripts: format: run: dart pub global run flutter_plugin_tools format description: | - Build a specific example app for Android. + activate flutter_plugin_tools - Requires `flutter_plugin_tools` (`pub global activate flutter_plugin_tools`). - Requires `clang-format` (can be installed via Brew on macOS). @@ -247,4 +247,4 @@ dev_dependencies: environment: sdk: ">=2.12.0 <3.0.0" - flutter: ">=1.12.13+hotfix.5 <2.0.0" + flutter: ">=1.12.13+hotfix.5 <3.0.0"