diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 71669a6ba..02a708858 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,9 +35,24 @@ jobs: - name: Install proxy for tests run: sudo apt-get install -y squid - run: dart pub get + - name: Ignore unsatisfied packages + run: export MELOS_IGNORE_PACKAGES=$(dart ./scripts/melos_packages.dart false) - uses: bluefireteam/melos-action@v2 with: run-bootstrap: false - - run: melos run files-patch - - run: melos run pre-bootstrap - - run: melos run github-ci + - name: Patching files for Flutter ${{ matrix.sdk }} + run: melos run files-patch + - name: Customized Melos Bootstrap + run: melos bootstrap $(eval echo $MELOS_IGNORE_PACKAGES) + - name: Format + run: melos exec $(eval echo $MELOS_IGNORE_PACKAGES) -- "dart format --set-exit-if-changed ." + - name: Analyze Dart packages + run: melos exec $(eval echo $MELOS_IGNORE_PACKAGES) --no-flutter -- "dart analyze --fatal-infos" + - name: Analyze Flutter packages + run: melos exec $(eval echo $MELOS_IGNORE_PACKAGES) --flutter -- "flutter analyze --fatal-infos" + - name: Publish dry-run + run: melos exec $(eval echo $MELOS_IGNORE_PACKAGES) --ignore="*example*" -- "dart pub publish --dry-run" + - name: Test Dart packages + run: melos exec $(eval echo $MELOS_IGNORE_PACKAGES) --ignore="*example*" --no-flutter -- "dart test --chain-stack-traces --platform=vm,chrome,firefox" + - name: Test Flutter packages + run: melos exec $(eval echo $MELOS_IGNORE_PACKAGES) --ignore="*example*" --flutter -- "flutter test" diff --git a/melos.yaml b/melos.yaml index 393ca5c5d..07be48a09 100644 --- a/melos.yaml +++ b/melos.yaml @@ -19,18 +19,3 @@ scripts: files-patch: # Apply files patches for different versions of SDKs. run: | dart $MELOS_ROOT_PATH/scripts/files_patch.dart - - pre-bootstrap: # Filtering available packages that need to be bootstrapped. - run: | - export MELOS_PACKAGES=$(dart $MELOS_ROOT_PATH/scripts/melos_packages.dart true) - melos bootstrap - - github-ci: # Executions for GitHub Action runners. - run: | - export MELOS_IGNORE_PACKAGES=$(dart $MELOS_ROOT_PATH/scripts/melos_packages.dart false) - melos exec $(eval echo $MELOS_IGNORE_PACKAGES) -- "dart format --set-exit-if-changed ." - melos exec $(eval echo $MELOS_IGNORE_PACKAGES) --no-flutter -- "dart analyze --fatal-infos" - melos exec $(eval echo $MELOS_IGNORE_PACKAGES) --flutter -- "flutter analyze --fatal-infos" - melos exec $(eval echo $MELOS_IGNORE_PACKAGES) --ignore="*example*" -- "dart pub publish --dry-run" - melos exec $(eval echo $MELOS_IGNORE_PACKAGES) --ignore="*example*" --no-flutter -- "dart test --chain-stack-traces --platform=vm,chrome,firefox" - melos exec $(eval echo $MELOS_IGNORE_PACKAGES) --ignore="*example*" --flutter -- "flutter test"