Skip to content

test(dml): pin gradient-stop transparency behavior with explicit cove… #102

test(dml): pin gradient-stop transparency behavior with explicit cove…

test(dml): pin gradient-stop transparency behavior with explicit cove… #102

Workflow file for this run

name: ci
# Runs on every push to a branch in this repo and on every pull request
# targeting master. Tags push the same code through publish.yml separately.
on:
push:
branches:
- master
- develop
- "release/**"
- "feature/**"
- "ci/**"
pull_request:
branches:
- master
workflow_dispatch:
permissions:
contents: read
jobs:
lint:
name: Lint (ruff)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
# ---uv tool run auto-installs on first invocation; no separate install step needed---
- name: ruff check
run: uv tool run ruff check src tests
- name: ruff format check
run: uv tool run ruff format --check src tests
typecheck:
name: Typecheck (pyright strict — public API)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up Python
run: uv python install 3.12
- name: Sync dev dependencies
run: uv sync --extra dev
# ---public-API surface: pptx/__init__.py is the literal entrypoint
# ---resolved by `from pptx import Presentation`, plus the modules
# ---it pulls in (api, presentation, util, exc, types).
# ---Strict-mode pyright on the broader codebase still surfaces several
# ---thousand findings (reportUnknownMemberType-heavy in chart and
# ---oxml.simpletypes); those are tracked as future work, not this gate.
- name: pyright (public-API entry points)
run: |
uv run pyright src/pptx/__init__.py src/pptx/api.py src/pptx/presentation.py \
src/pptx/util.py src/pptx/exc.py src/pptx/types.py
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Sync test dependencies
run: uv sync --extra test --python ${{ matrix.python-version }}
- name: Display Python version
run: uv run python -c "import sys; print(sys.version)"
- name: Unit + integration tests (pytest)
run: uv run pytest --cov=pptx --cov-report=term-missing tests
- name: Acceptance tests (behave)
run: uv run behave --stop
build-check:
name: Build sdist and wheel (smoke)
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Build distributions
run: uv build
- name: Verify metadata renders
run: uv tool run --from twine twine check dist/*
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist-${{ github.sha }}
path: dist/
retention-days: 7