From 90339d15a32fa1be77a1897c3c4aaf858743acd1 Mon Sep 17 00:00:00 2001 From: Hugo Pointcheval Date: Fri, 14 Apr 2023 12:13:37 +0200 Subject: [PATCH] ci: fix latest melos config --- melos.yaml | 92 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 34 deletions(-) diff --git a/melos.yaml b/melos.yaml index 2af93a3d..037c8490 100644 --- a/melos.yaml +++ b/melos.yaml @@ -1,65 +1,86 @@ name: Wyatt-Packages #repository: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages Gitea not yet supported +sdkPath: auto + packages: - packages/** +ide: + intellij: + enabled: false + command: - bootstrap: - usePubspecOverrides: true - version: updateGitTagRefs: true linkToCommits: false # Gitea not yet supported workspaceChangelog: true + includeCommitId: true branch: master + message: | + chore(release): publish packages 🎉 + + {new_package_versions} + + clean: + hooks: + post: melos exec --flutter --concurrency=3 -- "flutter clean" scripts: + analyze: + run: | + melos exec --flutter --concurrency=1 -- flutter analyze --fatal-infos + description: Run `flutter analyze` for all flutter packages. + + fix:apply: + run: melos exec --concurrency=1 -- dart fix . --apply + description: Run and apply `dart fix` for all packages. + + fix:check: + run: melos exec --concurrency=1 -- dart fix . --set-exit-if-changed + description: Run `dart fix` checks for all packages. + + format: + run: melos exec --concurrency=1 -- dart format . + description: Run `dart format` for all packages. + lint:all: run: melos run analyze && melos run format description: Run all static analysis checks. - analyze: - run: | - melos exec -c 1 -- flutter analyze --fatal-infos - description: Run `flutter analyze` for all packages. - - fix: - run: melos exec dart fix . --apply - description: Run `dart fix` for all packages. - - format: - run: melos exec dart format . - description: Run `dart format` for all packages. - - format-check: - run: melos exec dart fix . --set-exit-if-changed - description: Run `dart fix` checks for all packages. - clean:deep: run: git clean -x -d -f -q description: Clean things very deeply with `git clean`. test:selective_unit_test: - run: melos exec -- flutter test --no-pub --coverage + run: melos exec --concurrency=1 -- flutter test --no-pub --coverage description: Run Flutter tests for a specific package in this project. - select-package: - dir-exists: + packageFilters: + dirExists: - test ignore: - - '*example*' + - "*example*" test:all: run: melos run test:selective_unit_test --no-select description: Run all Flutter tests in this project. - gen-coverage: melos exec -- sh "\$MELOS_ROOT_PATH/combine_coverage.sh" && genhtml coverage/lcov.info -o coverage/html + gen:coverage: + run: | + melos exec --concurrency=1 -- sh "\$MELOS_ROOT_PATH/combine_coverage.sh" && \ + genhtml coverage/lcov.info -o coverage/html + description: | + Generate coverage report for all packages. + Requires `lcov` and `genhtml`. - gen-class-models: - run: melos exec -- dart pub global run dcdg -o models/class-models.puml - select-package: + gen:class_models: + run: melos exec --concurrency=1 -- dart pub global run dcdg -o models/class-models.puml + description: | + Generate class models for all packages. + Requires `dcdg`. (https://pub.dev/packages/dcdg) + packageFilters: ignore: - - '*example*' + - "*example*" quality-check: run: | @@ -70,13 +91,16 @@ scripts: publish:validate: run: melos publish --diff="origin/$DRONE_COMMIT_BRANCH...HEAD" --yes + description: | + Validate that all packages are ready to be published. + Requires DRONE_COMMIT_BRANCH to be set. + Note: This will not actually publish anything. publish:validate-local: run: melos publish --yes - + description: | + Validate that all packages are ready to be published. + Note: This will not actually publish anything. + # publish: # run: melos publish --diff="origin/$DRONE_COMMIT_BRANCH...HEAD" --no-dry-run --yes - - # Additional cleanup lifecycle script, executed when `melos clean` is run. - postclean: > - melos exec -c 6 -- "flutter clean"