v0.5.0 #185
Workflow file for this run
This file contains hidden or 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: Unit Tests | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13" ] | |
| steps: | |
| - name: 📥 Checkout code | |
| uses: actions/checkout@v3 | |
| - name: 🐍 Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: 📦 Install Poetry | |
| run: | | |
| curl -sSL https://install.python-poetry.org | python3 - | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: 📦 Install dependencies with Poetry | |
| run: | | |
| poetry lock | |
| poetry install --with dev | |
| - name: 🧪 Run tests with coverage | |
| run: | | |
| export REPORT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" | |
| export REPORT_COMMIT="$(git rev-parse HEAD)" | |
| poetry run pytest --cov=pytest_html_plus tests/ --cov-fail-under=39 --cov-report=term --reruns 1 --ignore=tests/browser --generate-xml --xml-report final_xml_ubuntu.xml --git-branch "$REPORT_BRANCH" --git-commit "$REPORT_COMMIT" | |
| - name: 🧪 Run tests with warnings enabled | |
| run: | | |
| export REPORT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" | |
| export REPORT_COMMIT="$(git rev-parse HEAD)" | |
| PYTHONWARNINGS=error poetry run pytest --cov=pytest_html_plus tests/ --cov-fail-under=39 --cov-report=term --reruns 1 --ignore=tests/browser --generate-xml --xml-report final_xml_ubuntu_warnings.xml --html-output=report_output_warnings --git-branch "$REPORT_BRANCH" --git-commit "$REPORT_COMMIT" | |
| - name: Upload HTML Report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: report-${{ github.job }}-${{ github.run_number }}-${{ matrix.python-version }} | |
| path: | |
| report_output/ | |
| - name: Upload HTML warnings Report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: report-warnings-${{ github.job }}-${{ github.run_number }}-${{ matrix.python-version }} | |
| path: | |
| report_output_warnings/ |