From c76d21812a2d827fec4e22ceb0753766aced237f Mon Sep 17 00:00:00 2001 From: Quang Date: Thu, 21 Nov 2024 16:20:35 +0700 Subject: [PATCH] Run test with cocerage --- .github/workflows/tests.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ece05da..85eb990 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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