Skip to content

run

run #133

Workflow file for this run

name: run
on:
push:
branches:
- main
- ci
pull_request:
branches:
- main
schedule:
# Run tests weekly on Sundays at 5:47 UTC.
# This might help us us detecting unexpected breakage due to changes in
# 3rd-party dependencies. GitHub only triggers this for the default branch.
- cron: '47 5 * * 0'
jobs:
tests_cpython:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
container:
image: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- name: Run tests without optional features
run: |
python -m venv venv-test
. venv-test/bin/activate
# Some versions of pip do not recognize the declared "extras" in `setup.cfg`.
# I don't know the exact problematic versions, so let's just upgrade pip.
# GOOD: pip 23.0.1 with setuptools 47.1.0 (Python 3.7)
# BAD: pip 23.0.1 with setuptools 56.0.0 (Python 3.8)
# BAD: pip 23.0.1 with setuptools 58.1.0 (Python 3.9)
# BAD: pip 23.0.1 with setuptools 65.5.0 (Python 3.10)
# GOOD: pip 24.0 with setuptools 65.5.0 (Python 3.11)
if [ "${{ matrix.python-version }}" != "3.6" ]; then
pip install "pip >= 24"
fi
pip install -e .[testing]
pytest -m "not css_inlining"
- name: Test CSS inlining
run: |
if [ "${{ matrix.python-version }}" != "3.6" ]; then
. venv-test/bin/activate
pip install -e .[css_inlining]
pytest
else
echo "Skipping CSS inlining tests for Python 3.6"
fi
tests_pypy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pypy-version: ["3.10", "3.11", "latest"]
container:
image: pypy:${{ matrix.pypy-version }}
steps:
- uses: actions/checkout@v4
- name: Run tests without optional features
run: |
python -m venv venv-test
. venv-test/bin/activate
pip install -e .[testing]
pytest -m "not css_inlining"