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 50 51 52 53 54 55 56 57 58 59 60 61
|
name: Test
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- '3.14'
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
id: setup_python
with:
python-version: ${{ matrix.python-version }}
- name: Install tidy
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y libtidy5deb1
- uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
with:
save-cache: ${{ github.ref == 'refs/heads/main' }}
cache-suffix: ${{ steps.setup_python.outputs.python-version }}
version: 0.9.22
- name: Install tidy
if: matrix.os == 'macos-latest'
run: brew install tidy-html5
- name: Install tidy
if: matrix.os == 'windows-latest'
run: choco install html-tidy -y
- name: Install pip dependencies
run: uv sync --all-extras
- name: Check used library
run: uv run python -c 'import tidy.lib; print(tidy.lib._tidy.lib._name)'
- name: Check used library version
run: uv run python -c 'import tidy.lib; print(tidy.lib.getTidyVersion())'
- name: Test
run: uv run pytest --cov=tidy tidy
- name: Coverage
run: uv run coverage xml
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{secrets.CODECOV_TOKEN}}
flags: unittests
name: Python ${{ matrix.python-version }}, ${{ matrix.os }}, tidy ${{ matrix.tidy-version }}
|