diff --git a/.melos/clean.yaml b/.melos/clean.yaml new file mode 100644 index 0000000..3b4b56c --- /dev/null +++ b/.melos/clean.yaml @@ -0,0 +1,39 @@ +scripts: + _: &workflow_scripts + clean: + run: > + melos exec -c 1 --fail-fast -- " + rm -rf build .dart_tool .packages .flutter-plugins .flutter-plugins-dependencies .pub-cache .pub .idea coverage doc/api .test_coverage.dart .test_runner.dart && + find . -name '*.g.dart' -delete && + find . -name '*.freezed.dart' -delete && + find . -name '*.mocks.dart' -delete && + find . -name '*.gr.dart' -delete && + find . -name '*.config.dart' -delete && + find . -name '*.hive.dart' -delete && + find . -name '*.chopper.dart' -delete && + find . -name '*.reflectable.dart' -delete && + find . -name '*.injectable.dart' -delete && + find . -name '*.gql.dart' -delete && + find . -name '*.gql.g.dart' -delete && + find . -name '*.iconfig.dart' -delete && + find . -name '*.moor.dart' -delete && + find . -name '*.drift.dart' -delete && + find . -name '*.mapper.dart' -delete && + find . -name '*.ast.gql.dart' -delete && + find . -name '*.req.gql.dart' -delete && + find . -name '*.data.gql.dart' -delete && + find . -name '*.var.gql.dart' -delete && + find . -name '*.jorm.dart' -delete && + find . -name '*.g.aot' -delete && + find . -name '*.g.ddc' -delete && + find . -name '*.g.js' -delete && + find . -name '*.g.js.map' -delete && + find . -name '*.g.part' -delete && + find . -name '*.g.sum' -delete && + find . -name '*.g.txt' -delete && + find . -name 'lcov.info' -delete && + find . -name 'coverage_report' -type d -exec rm -r {} + && + git clean -xdf + " && + flutter clean + description: Thoroughly clean all build artifacts, generated files, coverage reports, and documentation from the entire repository diff --git a/.melos/configure.yaml b/.melos/configure.yaml new file mode 100644 index 0000000..d2852d5 --- /dev/null +++ b/.melos/configure.yaml @@ -0,0 +1,13 @@ +scripts: + _: &configure_scripts + configure: + run: > + melos bootstrap && + MELOS_SCOPE="platform_container_generator" melos run generate:custom && + MELOS_SCOPE="package_model,package_exceptions,platform_mocking" melos run generate:dummy:test && + MELOS_SCOPE="platform_container_generator" melos run debug:reflectable && + melos run test && + melos run coverage && + melos run coverage_report && + melos run docs:generate + description: Configure the development environment, generate code and dummy tests, run tests, generate coverage, and create API documentation diff --git a/melos.yaml b/melos.yaml index 9dd3e41..6888e1e 100644 --- a/melos.yaml +++ b/melos.yaml @@ -68,6 +68,12 @@ scripts: coverage_report: run: "melos exec -c 1 --fail-fast -- \" if [ -s coverage\/lcov.info ]; then\n genhtml -o coverage_report coverage\/lcov.info;\n echo 'Coverage report generated successfully.';\nelse\n echo 'No valid coverage data found. Skipping report generation.';\nfi \"\n" description: "Generate HTML coverage report from LCOV data for each package, if valid data exists" + clean: + run: "melos exec -c 1 --fail-fast -- \" rm -rf build .dart_tool .packages .flutter-plugins .flutter-plugins-dependencies .pub-cache .pub .idea coverage doc\/api .test_coverage.dart .test_runner.dart && find . -name '*.g.dart' -delete && find . -name '*.freezed.dart' -delete && find . -name '*.mocks.dart' -delete && find . -name '*.gr.dart' -delete && find . -name '*.config.dart' -delete && find . -name '*.hive.dart' -delete && find . -name '*.chopper.dart' -delete && find . -name '*.reflectable.dart' -delete && find . -name '*.injectable.dart' -delete && find . -name '*.gql.dart' -delete && find . -name '*.gql.g.dart' -delete && find . -name '*.iconfig.dart' -delete && find . -name '*.moor.dart' -delete && find . -name '*.drift.dart' -delete && find . -name '*.mapper.dart' -delete && find . -name '*.ast.gql.dart' -delete && find . -name '*.req.gql.dart' -delete && find . -name '*.data.gql.dart' -delete && find . -name '*.var.gql.dart' -delete && find . -name '*.jorm.dart' -delete && find . -name '*.g.aot' -delete && find . -name '*.g.ddc' -delete && find . -name '*.g.js' -delete && find . -name '*.g.js.map' -delete && find . -name '*.g.part' -delete && find . -name '*.g.sum' -delete && find . -name '*.g.txt' -delete && find . -name 'lcov.info' -delete && find . -name 'coverage_report' -type d -exec rm -r {} + && git clean -xdf \" && flutter clean\n" + description: "Thoroughly clean all build artifacts, generated files, coverage reports, and documentation from the entire repository" + configure: + run: "melos bootstrap && MELOS_SCOPE=\"platform_container_generator\" melos run generate:custom && MELOS_SCOPE=\"package_model,package_exceptions,platform_mocking\" melos run generate:dummy:test && MELOS_SCOPE=\"platform_container_generator\" melos run debug:reflectable && melos run test && melos run coverage && melos run coverage_report && melos run docs:generate\n" + description: "Configure the development environment, generate code and dummy tests, run tests, generate coverage, and create API documentation" test: run: melos exec -c 1 --fail-fast -- "dart test" description: Run tests for all packages