build: Melos, a Dart check and every path for the single repository
- Melos 8.9 as the root's dev dependency, with scripts across the workspace (analyze, test:dart, test:flutter, generate, check) and its filters (--diff, --include-dependents); cli_util overridden to 0.5.2 for it, since Learn's flutter_launcher_icons asks for 0.4 and uses only its logger, unchanged in 0.5. - tool/check.dart in place of tool/check.sh: packages, formatting of our own files, analysis, the tools' tests, then every package's tests through Melos (--changed-since=<commit> for only what changed and what depends on it). tool/pre-push is the hook: the signature check, then the checks. CI generates every server's code and runs the same check. - The images build from the root with a workspace narrowed to what they need (tool/workspace_only.sh); compose, the deploy's migration test, the snap, the release script, the editor's launch files and Learn's asset tools (run from apps/learn) follow the new layout. - The project's source is named as project-halkyon/halkyon (source link, snap, F-Droid listing, release uploads); the AGPL packages carry the licence's own text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
9643412be9
commit
af1dbee509
1 changed files with 3771 additions and 792 deletions
50
pubspec.yaml
50
pubspec.yaml
|
|
@ -27,10 +27,20 @@ workspace:
|
|||
- packages/halkyon_ui/example
|
||||
|
||||
dev_dependencies:
|
||||
# The tools' (tool/check.dart) options, and their tests (test/).
|
||||
args: ^2.7.0
|
||||
# Referenced by analysis_options.yaml in this directory.
|
||||
leancode_lint: ^27.0.0
|
||||
# Runs scripts across the workspace's packages (`melos:` below): `dart run melos …`.
|
||||
melos: ^8.9.0
|
||||
test: ^1.31.1
|
||||
|
||||
dependency_overrides:
|
||||
# Learn's flutter_launcher_icons (0.14.4, its latest, from June 2025) asks for
|
||||
# cli_util ^0.4.1, Melos for 0.5 or later. Of cli_util it uses only the logger
|
||||
# (`Logger.standard`, `Logger.verbose`, `Ansi`, `Progress`), the same in 0.5.2.
|
||||
# Drop this once flutter_launcher_icons allows 0.5.
|
||||
cli_util: ^0.5.2
|
||||
# The offline sync package's shared part from our fork: v0.0.10 with seven
|
||||
# changes. Byte payloads compared as bytes: v0.0.10 compares them byte by byte
|
||||
# through a UUID parse that throws for each byte, so a sync touching a few thousand
|
||||
|
|
@ -54,3 +64,43 @@ dependency_overrides:
|
|||
url: https://code.halkyon.app/project-halkyon/serverpod-offline-sync.git
|
||||
path: packages/serverpod_offline_sync
|
||||
ref: 949a6645e08af27bb61c96d7ddc2b6d145fed554
|
||||
|
||||
# Melos (https://melos.invertase.dev): its scripts run across the workspace's packages,
|
||||
# `dart run melos run <name>`, and take Melos' filters, such as
|
||||
# `--diff=origin/main --include-dependents` for only what changed since main and what
|
||||
# depends on it. tool/check.dart runs the tests through them.
|
||||
melos:
|
||||
scripts:
|
||||
analyze:
|
||||
description: Analyses the whole workspace, infos fatal too, as CI does.
|
||||
run: dart analyze --fatal-infos
|
||||
test:dart:
|
||||
description: The tests of the packages without Flutter (servers, curator, the
|
||||
shared Dart packages). Each server's start a PostgreSQL of their own on one
|
||||
port, so one package at a time.
|
||||
exec:
|
||||
command: dart test
|
||||
concurrency: 1
|
||||
packageFilters:
|
||||
flutter: false
|
||||
dirExists: test
|
||||
test:flutter:
|
||||
description: The tests of the Flutter packages, those needing a running server
|
||||
left out (`flutter test -t requires-server` runs them by hand).
|
||||
exec:
|
||||
command: flutter test -x requires-server
|
||||
concurrency: 1
|
||||
packageFilters:
|
||||
flutter: true
|
||||
dirExists: test
|
||||
generate:
|
||||
description: Serverpod's code generation in every server package (the CLI on
|
||||
the PATH, at the version CI pins).
|
||||
exec:
|
||||
command: serverpod --no-analytics generate
|
||||
concurrency: 1
|
||||
packageFilters:
|
||||
fileExists: config/generator.yaml
|
||||
check:
|
||||
description: Every check a push has to pass (tool/check.dart).
|
||||
run: dart run tool/check.dart
|
||||
|
|
|
|||
Loading…
Reference in a new issue