mirror of
https://github.com/Xevion/linkpulse.git
synced 2025-12-06 15:15:34 -06:00
Add pytest-coverage-comment, use color
This commit is contained in:
28
.github/workflows/test.yaml
vendored
28
.github/workflows/test.yaml
vendored
@@ -35,4 +35,30 @@ jobs:
|
||||
- name: Install library
|
||||
run: cd backend && poetry install --no-interaction
|
||||
|
||||
- run: cd backend && poetry run pytest
|
||||
- name: Pytest
|
||||
run: |
|
||||
cd backend
|
||||
poetry run pytest --color=yes --cov-report=term-missing:skip-covered --cov=app tests/ | tee pytest-coverage.txt
|
||||
|
||||
- name: Pytest coverage comment
|
||||
id: coverageComment
|
||||
uses: MishaKav/pytest-coverage-comment@main
|
||||
with:
|
||||
pytest-coverage-path: ./pytest-coverage.txt
|
||||
junitxml-path: ./pytest.xml
|
||||
|
||||
- name: Check the output coverage
|
||||
run: |
|
||||
echo "Coverage Percentage - ${{ steps.coverageComment.outputs.coverage }}"
|
||||
echo "Coverage Color - ${{ steps.coverageComment.outputs.color }}"
|
||||
echo "Coverage Html - ${{ steps.coverageComment.outputs.coverageHtml }}"
|
||||
echo "Summary Report - ${{ steps.coverageComment.outputs.summaryReport }}"
|
||||
|
||||
echo "Coverage Warnings - ${{ steps.coverageComment.outputs.warnings }}"
|
||||
|
||||
echo "Coverage Errors - ${{ steps.coverageComment.outputs.errors }}"
|
||||
echo "Coverage Failures - ${{ steps.coverageComment.outputs.failures }}"
|
||||
echo "Coverage Skipped - ${{ steps.coverageComment.outputs.skipped }}"
|
||||
echo "Coverage Tests - ${{ steps.coverageComment.outputs.tests }}"
|
||||
echo "Coverage Time - ${{ steps.coverageComment.outputs.time }}"
|
||||
echo "Not Success Test Info - ${{ steps.coverageComment.outputs.notSuccessTestInfo }}"
|
||||
Reference in New Issue
Block a user