fix: run migrations before unit tests in CI
Some unit tests (test_api_deps, test_server_key) are integration tests that need DB tables. Move alembic upgrade head before unit tests.
This commit is contained in:
parent
06b5a3dc12
commit
70eb9f6b12
3 changed files with 71 additions and 6 deletions
|
|
@ -62,13 +62,14 @@ jobs:
|
|||
- name: Install Playwright browsers
|
||||
run: uv run playwright install --with-deps chromium
|
||||
|
||||
- name: Run migrations
|
||||
run: uv run alembic upgrade head
|
||||
|
||||
- name: Run unit tests
|
||||
run: uv run pytest tests/ --ignore=tests/e2e -v --tb=short
|
||||
|
||||
- name: Run E2E tests
|
||||
run: |
|
||||
uv run alembic upgrade head
|
||||
uv run pytest tests/e2e/ -v --tb=short
|
||||
run: uv run pytest tests/e2e/ -v --tb=short
|
||||
|
||||
docker:
|
||||
needs: test
|
||||
|
|
|
|||
|
|
@ -63,13 +63,14 @@ jobs:
|
|||
- name: Install Playwright browsers
|
||||
run: uv run playwright install --with-deps chromium
|
||||
|
||||
- name: Run migrations
|
||||
run: uv run alembic upgrade head
|
||||
|
||||
- name: Run unit tests
|
||||
run: uv run pytest tests/ --ignore=tests/e2e -v --tb=short
|
||||
|
||||
- name: Run E2E tests
|
||||
run: |
|
||||
uv run alembic upgrade head
|
||||
uv run pytest tests/e2e/ -v --tb=short
|
||||
run: uv run pytest tests/e2e/ -v --tb=short
|
||||
|
||||
release:
|
||||
needs: test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue