Skip to content

Migrate to pyproject.toml and uv #73

Migrate to pyproject.toml and uv

Migrate to pyproject.toml and uv #73

Workflow file for this run

name: CI
permissions:
contents: read
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
- "renovate/**"
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.14"
- uses: astral-sh/setup-uv@v7
- run: uv sync --dev
- run: uv run make lint
- run: uv run make benchmark
- run: uv run make build
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- run: npm ci
- run: npm run lint
- run: uv run make test-coverage
test_compat:
needs: test
runs-on: ubuntu-latest
name: ${{ matrix.python }}
strategy:
matrix:
include:
- python: "3.10"
toxenv: py310-upper_bound_deps
- python: "3.11"
toxenv: py311-upper_bound_deps
- python: "3.12"
toxenv: py312-upper_bound_deps
- python: "3.13"
toxenv: py313-upper_bound_deps
- python: "3.14"
toxenv: py314-upper_bound_deps
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- uses: astral-sh/setup-uv@v7
- run: uv sync --dev
- run: sudo apt-get install libxml2-dev libxslt-dev
- run: uv run tox --parallel
env:
TOXENV: ${{ matrix.toxenv }}
test_experimental:
# Ad-hoc job to test experimental support without having to adjust all of our project for compatibility.
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
# See available versions:
# https://github.com/actions/python-versions/blob/main/versions-manifest.json
python-version: "3.15.0-alpha.3"
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- run: uv venv
- run: uv pip install 'beautifulsoup4>=4.4.1,<5' 'html5lib>=0.999,<2'
- run: uv run python -X dev -W error example.py
- run: uv run make build