diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b47f5be7..2f97e303 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,7 +60,19 @@ jobs: - name: Install dependencies run: uv venv && uv pip install .[test] - name: Test with pytest - run: source .venv/bin/activate && pytest + run: source .venv/bin/activate && pytest --cov-report "xml:coverage.xml" --cov=shvatka tests/ + - name: Coverage comment + uses: MishaKav/pytest-coverage-comment@main + with: + pytest-xml-coverage-path: ./coverage.xml + title: Let's see coverage + badge-title: coverage + hide-badge: false + hide-report: false + create-new-comment: false + hide-comment: false + report-only-changed-files: false + remove-link-from-badge: false docs: needs: [build] runs-on: ubuntu-latest diff --git a/pyproject.toml b/pyproject.toml index 56d2225e..fe6be332 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,6 +47,7 @@ test = [ "pytest>=7.2.0,<8.0", "pytest-ordering>=0.6,<0.7", "pytest-asyncio>=0.18.3,<0.19", + "pytest-cov", "testcontainers>=4.5.1,<5.0", "httpx>=0.23.0,<0.24.0", "coverage[toml]",