Skip to content

feat: add Tailwind CSS pipeline, tag-aware cloning & CI/CD #659

feat: add Tailwind CSS pipeline, tag-aware cloning & CI/CD

feat: add Tailwind CSS pipeline, tag-aware cloning & CI/CD #659

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Run tests
run: pytest
# Run pre-commit only on Python 3.13 + ubuntu.
- name: Run pre-commit hooks
if: ${{ matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest' }}
run: pre-commit run --all-files
frontend:
needs: test # Builds Tailwind CSS only if tests pass
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install Node deps
run: npm ci
- name: Build CSS
run: npm run build:css # Creates src/static/css/site.css
- name: Upload artefact
uses: actions/upload-artifact@v4
with:
name: static-css
path: src/static/css/site.css