From d9c7e0e71ad3b1372e61fc301d40ba4d5fd80e16 Mon Sep 17 00:00:00 2001 From: Grigoriev Semyon <33061489+grigoriev-semyon@users.noreply.github.com> Date: Fri, 14 Apr 2023 03:33:04 +0300 Subject: [PATCH] Comment Action (#17) --- .github/workflows/checks.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 1de95ba..47e04e6 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -29,9 +29,25 @@ jobs: DB_DSN=postgresql://postgres@localhost:5432/postgres alembic upgrade head - name: Build coverage file run: | - DB_DSN=postgresql://postgres@localhost:5432/postgres pytest --cache-clear --cov=marketing_api tests > pytest-coverage.txt - - name: Comment coverage - uses: coroo/pytest-coverage-commentator@v1.0.2 + DB_DSN=postgresql://postgres@localhost:5432/postgres pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=marketing_api tests/ | tee pytest-coverage.txt + - name: Print report + if: always() + run: | + cat pytest-coverage.txt + - name: Pytest coverage comment + uses: MishaKav/pytest-coverage-comment@main + with: + pytest-coverage-path: ./pytest-coverage.txt + title: Coverage Report + badge-title: Code Coverage + hide-badge: false + hide-report: false + create-new-comment: false + hide-comment: false + report-only-changed-files: false + remove-link-from-badge: false + junitxml-path: ./pytest.xml + junitxml-title: Summary linting: runs-on: ubuntu-latest steps: