diff --git a/.github/workflows/cov.yml b/.github/workflows/cov.yml index cf4b63d..2529540 100644 --- a/.github/workflows/cov.yml +++ b/.github/workflows/cov.yml @@ -5,7 +5,7 @@ on: jobs: cov_job: - runs-on: ubuntu latest + runs-on: ubuntu-latest name: checking coverage permissions: pull-requests: write @@ -22,11 +22,31 @@ jobs: - name: install whatever run: pip install . + - name: install pytest + run: pip install pytest + - name: launch test - run: pytest + run: python3 -m pytest + + - name: launch coverage + run: + coverage run -m pytest + + - name: force htmlcov + run: + git add -f htmlcov/* - - name: cov comment - id: coverage-comment + - name: cov_comment + id: coverage_comment uses: py-cov-action/python-coverage-comment-action@v3 with: - GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file + GITHUB_TOKEN: ${{ github.token }} + + - name: Store Pull Request comment to be posted + uses: actions/upload-artifact@v3 + if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true' + with: + # If you use a different name, update COMMENT_ARTIFACT_NAME accordingly + name: python-coverage-comment-action + # If you use a different name, update COMMENT_FILENAME accordingly + path: python-coverage-comment-action.txt \ No newline at end of file