Merge branch 'main' of https://github.com/BastelBaus/Galaxy6D #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Galaxy6DLib pytest runner | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
#python-version: ["pypy3.9", "pypy3.10", "3.9", "3.10", "3.11", "3.12"] | |
python-version: ["3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
cd Galaxy6DLib | |
python -m pip install --upgrade pip | |
pip install pytest pytest-cov pytest-datafiles | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Test with pytest | |
run: | | |
cd Galaxy6DLib | |
pytest --doctest-modules --junitxml=junit/test-results.xml --cov=. --cov-report=xml --cov-report=html | |
# pytest --doctest-modules --junitxml=junit/test-results.xml ---cov=. --cov-report=term-missing:skip-covered tests/ | tee pytest-coverage.txt | |
# pytest tests.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html | |
# pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=app tests/ | tee pytest-coverage.txt | |
- name: Pytest coverage comment | |
uses: MishaKav/pytest-coverage-comment@main | |
with: | |
#pytest-coverage-path: Galaxy6DLib/tests/pytest-coverage.txt | |
junitxml-path: Galaxy6DLib/junit/test-results.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 }}" | |