Skip to content

Commit

Permalink
Run test with cocerage
Browse files Browse the repository at this point in the history
  • Loading branch information
quang-ng committed Nov 21, 2024
1 parent 7c8d225 commit c76d218
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,24 @@ jobs:
run: |
pip install uv
uv sync --all-extras
pip install coverage
- name: Start Docker stack
run: |
cp .mockenv .env
docker compose -f .docker/postgres-compose.yaml up -d
- name: Run tests
run: uv run pytest tests
- name: Run tests with coverage
run: |
coverage run -m pytest tests
coverage report
coverage xml
- name: Stop Docker stack
if: always()
run: docker compose -f .docker/postgres-compose.yaml down

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: coverage.xml

0 comments on commit c76d218

Please sign in to comment.