From c2faa1676845b08498eff352013b79e42518149d Mon Sep 17 00:00:00 2001 From: thomashii Date: Sat, 8 Jan 2022 14:20:42 +0800 Subject: [PATCH] Added ORM test action --- .github/workflows/dart.yml | 14 ++++++++++++++ packages/orm/angel_orm_generator/pubspec.yaml | 10 +++++----- .../orm/angel_orm_test/lib/src/join_test.dart | 8 +++++--- .../angel_orm_test/lib/src/models/person.dart | 2 +- .../lib/src/models/person_order.dart | 2 +- packages/orm/angel_orm_test/pubspec.yaml | 16 +++++++--------- 6 files changed, 33 insertions(+), 19 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index cf200646..996bea9a 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -79,3 +79,17 @@ jobs: working-directory: packages/orm/angel_orm_generator run: dart analyze . + # Angel3 ORM Test + - id: angel3_orm_test_upgrade + working-directory: packages/orm/angel_orm_test + run: dart pub upgrade + + - name: angel3_test_orm; Verify formatting + working-directory: packages/orm/angel_orm_test + run: dart format --output=none --set-exit-if-changed . + + # Consider passing '--fatal-infos' for slightly stricter analysis. + - name: angel3_test_orm; Analyze source code + working-directory: packages/orm/angel_orm_test + run: dart analyze . + diff --git a/packages/orm/angel_orm_generator/pubspec.yaml b/packages/orm/angel_orm_generator/pubspec.yaml index 202214d6..3e9e00df 100644 --- a/packages/orm/angel_orm_generator/pubspec.yaml +++ b/packages/orm/angel_orm_generator/pubspec.yaml @@ -30,9 +30,9 @@ dev_dependencies: postgres: ^2.4.0 test: ^1.17.3 lints: ^1.0.0 -#dependency_overrides: -# angel3_orm: -# path: ../angel_orm -# angel3_migration: -# path: ../angel_migration +dependency_overrides: + angel3_orm: + path: ../angel_orm + angel3_migration: + path: ../angel_migration \ No newline at end of file diff --git a/packages/orm/angel_orm_test/lib/src/join_test.dart b/packages/orm/angel_orm_test/lib/src/join_test.dart index 0c4758b5..b380de64 100644 --- a/packages/orm/angel_orm_test/lib/src/join_test.dart +++ b/packages/orm/angel_orm_test/lib/src/join_test.dart @@ -74,8 +74,10 @@ void joinTests(FutureOr Function() createExecutor, alias: 'P'); query.where?.raw("P.name = '${originalPerson?.name}'"); var orders = await query.get(executor); - expect(orders.every((element) => - element.personName == originalPerson?.name && - element.personAge == originalPerson?.age), true); + expect( + orders.every((element) => + element.personName == originalPerson?.name && + element.personAge == originalPerson?.age), + true); }); } diff --git a/packages/orm/angel_orm_test/lib/src/models/person.dart b/packages/orm/angel_orm_test/lib/src/models/person.dart index e76768d9..8ea4be24 100644 --- a/packages/orm/angel_orm_test/lib/src/models/person.dart +++ b/packages/orm/angel_orm_test/lib/src/models/person.dart @@ -23,4 +23,4 @@ class _PersonWithLastOrder { @Column(expression: 'po.price') int? lastOrderPrice; -} \ No newline at end of file +} diff --git a/packages/orm/angel_orm_test/lib/src/models/person_order.dart b/packages/orm/angel_orm_test/lib/src/models/person_order.dart index 68ca9c7b..eda4f1b7 100644 --- a/packages/orm/angel_orm_test/lib/src/models/person_order.dart +++ b/packages/orm/angel_orm_test/lib/src/models/person_order.dart @@ -33,4 +33,4 @@ abstract class _OrderWithPersonInfo extends Model { @Column(expression: 'p.age') int? get personAge; -} \ No newline at end of file +} diff --git a/packages/orm/angel_orm_test/pubspec.yaml b/packages/orm/angel_orm_test/pubspec.yaml index 1ed9f2ce..c022e716 100644 --- a/packages/orm/angel_orm_test/pubspec.yaml +++ b/packages/orm/angel_orm_test/pubspec.yaml @@ -19,12 +19,10 @@ dev_dependencies: angel3_framework: ^4.2.0 build_runner: ^2.0.1 lints: ^1.0.0 -#dependency_overrides: -# angel3_migration_runner: -# path: ../angel_migration_runner -# angel3_orm: -# path: ../angel_orm -# angel3_migration: -# path: ..//angel_migration -# angel3_orm_generator: -# path: ../angel_orm_generator +dependency_overrides: + angel3_orm: + path: ../angel_orm + angel3_orm_generator: + path: ../angel_orm_generator + angel3_migration: + path: ../angel_migration