Skip to content

Commit

Permalink
💚 Split steps
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Nov 7, 2023
1 parent e9804d1 commit 5a4b5e3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,26 @@ 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)
echo $MELOS_IGNORE_PACKAGES
- 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: dart ./scripts/files_patch.dart
- name: Bootstrap
run: melos pre-bootstrap
- 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"
14 changes: 0 additions & 14 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,7 @@ command:
runPubGetInParallel: false

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"

0 comments on commit 5a4b5e3

Please sign in to comment.