forked from psf/requests-html
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.65 KB
/
tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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() }}