Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,33 @@ on:
jobs:
test:
runs-on: ubuntu-latest

env:
ASYNC_DB_URL: postgresql+asyncpg://user:pass@localhost:5432/testdb
SYNC_DB_URL: postgresql+psycopg2://user:pass@localhost:5432/testdb

services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_DB: testdb
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"

- name: Install Poetry
run: |
Expand All @@ -23,6 +43,10 @@ jobs:
run: |
poetry install --no-interaction --with dev --without ML

- name: Migrate DB
run: |
alembic upgrade head

- name: Run tests and generate coverage report
run: |
poetry run pytest --cov=audiostats --cov-report=lcov tests/
Expand Down
Loading