feat: update requirements add 3.13 to test runner #35
Workflow file for this run
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: python-tests | |
on: | |
# run tests on all PR's to main | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[dev] | |
playwright install | |
- name: Test with pytest | |
run: | | |
python -m pytest --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov=requests-html --cov-report=xml --cov-report=html tests -v | |
- name: Upload pytest results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pytest-results-${{ matrix.python-version }} | |
path: junit/test-results-${{ matrix.python-version }}.xml | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
- name: Upload xml coverage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pytest-coverage-xml-${{ matrix.python-version }} | |
path: coverage.xml | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
- name: Upload html coverage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pytest-coverage-html-${{ matrix.python-version }} | |
path: htmlcov/ | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} |