Skip to content

ci: run pytest on PR #3

ci: run pytest on PR

ci: run pytest on PR #3

Workflow file for this run

name: Test
on:
pull_request:
branches: [main]
paths: ["**.py"]
permissions: {}
jobs:
pytest:
name: pytest
runs-on: ubuntu-latest
permissions:
contents: read # Required to checkout the repository.
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
with:
python-version-file: .python-version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
- name: Run pytest
run: pytest tests/ --doctest-modules --junitxml=junit/test-results.xml
- name: Upload artifact
# Always run this step to upload test results when there are test failures
if: always()
uses: actions/upload-artifact@v4
with:
name: pytest-results
path: junit/test-results.xml