Skip to content

Fix issue with new version of lxml #21

Fix issue with new version of lxml

Fix issue with new version of lxml #21

Workflow file for this run

name: Run tests
on:
workflow_dispatch:
pull_request:
branches:
- "main"
jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: "Install dependencies (compatible)"
run: |
python -m pip install --upgrade pip
# pytest 4.6.X works best for older Python versions
pip install -U "lxml[html_clean]" "pytest==4.6.9" codecov 'coverage==4.5.4' pytest-cov
if: ${{ matrix.python-version == '2.7' }}
- name: "Install dependencies (up to date)"
run: |
python -m pip install --upgrade pip
pip install -U "lxml[html_clean]" pytest codecov coverage pytest-cov
if: ${{ matrix.python-version != '2.7' }}
- run: py.test tests
env:
CI: 1
PYTHONDONTWRITEBYTECODE: 1