Update .coveragerc #21
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: Test | |
on: | |
push: | |
branches: | |
- main # Run when code is pushed to the main branch | |
pull_request: | |
branches: | |
- main # Run on pull requests targeting the main branch | |
workflow_dispatch: # Allows manual trigger from GitHub Actions UI | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: windows-latest | |
name: Windows Python 3.12.6 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12.6 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12.6" | |
allow-prereleases: true | |
cache: pip | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest pytest-cov Pillow NumPy | |
choco install ghostscript --version=9.54.0 # Install Ghostscript on Windows | |
- name: Run tests and generate coverage report | |
run: | | |
pytest --cov=. --cov-report=xml | |
env: | |
PYTHONOPTIMIZE: 0 # Ensure optimizations are disabled | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage.xml | |
flags: GHA_Windows | |
name: Windows Python 3.12.6 | |
- name: Upload errors | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: errors | |
path: Tests/errors |