Skip to content

Merge branch 'main' of github.com:cboin1996/requests-html #20

Merge branch 'main' of github.com:cboin1996/requests-html

Merge branch 'main' of github.com:cboin1996/requests-html #20

Workflow file for this run

name: tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- 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() }}