Added ORM test action

This commit is contained in:
thomashii 2022-01-08 14:20:42 +08:00
parent 699e009899
commit c2faa16768
6 changed files with 33 additions and 19 deletions

View file

@ -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 .

View file

@ -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

View file

@ -74,8 +74,10 @@ void joinTests(FutureOr<QueryExecutor> 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);
});
}

View file

@ -23,4 +23,4 @@ class _PersonWithLastOrder {
@Column(expression: 'po.price')
int? lastOrderPrice;
}
}

View file

@ -33,4 +33,4 @@ abstract class _OrderWithPersonInfo extends Model {
@Column(expression: 'p.age')
int? get personAge;
}
}

View file

@ -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