Skip to content

Commit

Permalink
test coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
Aldrian Harjati committed Aug 22, 2023
1 parent e72acbc commit 1a8a0c3
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff pytest
pip install ruff pytest pytest-cov
if [ -f .devcontainer/requirements.txt ]; then pip install -r .devcontainer/requirements.txt; fi
- name: Lint with ruff
run: |
Expand All @@ -28,3 +28,40 @@ jobs:
- name: Test with pytest
run: |
pytest
- name: Build coverage file
run: |
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov-report "xml:coverage.xml" --cov=src src/tests/ | tee pytest-coverage.txt
- name: Pytest coverage comment
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 Percantage - ${{ 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 }}"
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
pytest-xml-coverage-path: ./coverage.xml
title: Test Coverage Report
badge-title: Test Coverage
hide-badge: false
hide-report: false
create-new-comment: false
hide-comment: false
report-only-changed-files: false
remove-link-from-badge: false
unique-id-for-comment: python3.8
junitxml-path: ./pytest.xml
junitxml-title: Test Summary

2 comments on commit 1a8a0c3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/validator
   check_functions.py1843680%55–59, 113–123, 288–294, 308–321, 382, 440–454, 748
   checks.py17170%27–76
   create_schemas.py13130%4–26
   global_data.py18478%35–38
   main.py40400%8–70
   phase_validations.py660%11–42
   schema.py880%9–44
   schema_template.py660%12–516
TOTAL71813082% 

Tests Skipped Failures Errors Time
94 0 💤 0 ❌ 0 🔥 1.332s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Coverage

Test Coverage Report
FileStmtsMissCoverMissing
tests
   __init__.py40100% 
   test_check_functions.py4180100% 
validator
   __init__.py40100% 
   check_functions.py1843680%55, 59, 113, 115–116, 118, 121, 123, 288–294, 308–312, 316, 319–321, 382, 440–445, 449, 452–454, 748
   checks.py17170%27, 29–31, 34, 43, 58–59, 62, 64, 66–67, 69, 72–73, 75–76
   create_schemas.py13130%4–6, 11–12, 15–18, 21–22, 25–26
   global_data.py18477%35–38
   main.py40400%8, 10–12, 15–16, 19, 25–29, 31, 33–36, 38, 42–43, 45–47, 49, 51–53, 56–65, 67, 69–70
   phase_validations.py660%11–12, 35, 38, 41–42
   schema.py880%9–10, 33–34, 37, 40, 43–44
   schema_template.py660%12–13, 15, 17, 508, 516
TOTAL71813081% 

Test Summary

Tests Skipped Failures Errors Time
94 0 💤 0 ❌ 0 🔥 1.332s ⏱️

Please sign in to comment.