chore: update test ci runner to use main branch #16
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: tests | |
on: | |
push: | |
branches: [main, dev] | |
pull_request: | |
branches: [main, dev] | |
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() }} |