mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
ddd tests
This commit is contained in:
parent
25ba1427b1
commit
6c8fe86cf9
1 changed files with 32 additions and 0 deletions
32
.github/workflows/ddd_tests.yml
vendored
Normal file
32
.github/workflows/ddd_tests.yml
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
name: Run DDD tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "**"
|
||||
|
||||
# The DDD rewrite (tests/) defines SQLModel table classes that map to the same
|
||||
# physical tables as the legacy backend models. Both sets share the one global
|
||||
# SQLModel.metadata, so they cannot be imported into the same pytest process —
|
||||
# hence this runs as a separate workflow from unit_tests.yml until the legacy
|
||||
# models are retired. It also covers the Lambda packaging linter
|
||||
# (tests/test_lambda_packaging.py). Its DB is spawned in-process by
|
||||
# pytest-postgresql, so no `services: postgres` and no env secrets are required,
|
||||
# and it runs independently of (and in parallel with) the legacy unit tests.
|
||||
jobs:
|
||||
ddd-tests:
|
||||
name: DDD tests (Docker)
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build test image
|
||||
run: docker build -f Dockerfile.test -t model-test .
|
||||
|
||||
- name: Run DDD tests
|
||||
run: |
|
||||
docker run --rm \
|
||||
--network host \
|
||||
model-test pytest -vv tests/
|
||||
Loading…
Add table
Reference in a new issue