@@ -25,30 +25,29 @@ jobs:
2525 runs-on : ubuntu-latest
2626 steps :
2727 - uses : actions/checkout@v4
28- - name : Set up Python
29- uses : actions /setup-python @v5
28+ - name : Install uv
29+ uses : astral-sh /setup-uv @v5
3030 with :
31- python-version : " 3.12"
32- - name : Install ruff
33- run : python -m pip install --upgrade ruff
31+ enable-cache : true
32+ # ---uv tool run auto-installs on first invocation; no separate install step needed---
3433 - name : ruff check
35- run : ruff check src tests
34+ run : uv tool run ruff check src tests
3635 - name : ruff format check
37- run : ruff format --check src tests
36+ run : uv tool run ruff format --check src tests
3837
3938 typecheck :
4039 name : Typecheck (pyright strict — public API)
4140 runs-on : ubuntu-latest
4241 steps :
4342 - uses : actions/checkout@v4
44- - name : Set up Python
45- uses : actions /setup-python @v5
43+ - name : Install uv
44+ uses : astral-sh /setup-uv @v5
4645 with :
47- python-version : " 3.12 "
48- - name : Install package and pyright
49- run : |
50- python -m pip install --upgrade pip pyright
51- python -m pip install -e .
46+ enable-cache : true
47+ - name : Set up Python
48+ run : uv python install 3.12
49+ - name : Sync dev dependencies
50+ run : uv sync --extra dev
5251 # ---public-API surface: pptx/__init__.py is the literal entrypoint
5352 # ---resolved by `from pptx import Presentation`, plus the modules
5453 # ---it pulls in (api, presentation, util, exc, types).
5756 # ---oxml.simpletypes); those are tracked as future work, not this gate.
5857 - name : pyright (public-API entry points)
5958 run : |
60- pyright src/pptx/__init__.py src/pptx/api.py src/pptx/presentation.py \
61- src/pptx/util.py src/pptx/exc.py src/pptx/types.py
59+ uv run pyright src/pptx/__init__.py src/pptx/api.py src/pptx/presentation.py \
60+ src/pptx/util.py src/pptx/exc.py src/pptx/types.py
6261
6362 test :
6463 name : Test (Python ${{ matrix.python-version }})
@@ -69,38 +68,35 @@ jobs:
6968 python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
7069 steps :
7170 - uses : actions/checkout@v4
72- - name : Set up Python ${{ matrix.python-version }}
73- uses : actions /setup-python @v5
71+ - name : Install uv
72+ uses : astral-sh /setup-uv @v5
7473 with :
75- python-version : ${{ matrix.python-version }}
74+ enable-cache : true
75+ - name : Set up Python ${{ matrix.python-version }}
76+ run : uv python install ${{ matrix.python-version }}
77+ - name : Sync test dependencies
78+ run : uv sync --extra test --python ${{ matrix.python-version }}
7679 - name : Display Python version
77- run : python -c "import sys; print(sys.version)"
78- - name : Install package and test deps
79- run : |
80- python -m pip install --upgrade pip
81- python -m pip install -e .
82- python -m pip install -r requirements-test.txt
80+ run : uv run python -c "import sys; print(sys.version)"
8381 - name : Unit + integration tests (pytest)
84- run : pytest --cov=pptx --cov-report=term-missing tests
82+ run : uv run pytest --cov=pptx --cov-report=term-missing tests
8583 - name : Acceptance tests (behave)
86- run : behave --stop
84+ run : uv run behave --stop
8785
8886 build-check :
8987 name : Build sdist and wheel (smoke)
9088 runs-on : ubuntu-latest
9189 needs : test
9290 steps :
9391 - uses : actions/checkout@v4
94- - name : Set up Python
95- uses : actions /setup-python @v5
92+ - name : Install uv
93+ uses : astral-sh /setup-uv @v5
9694 with :
97- python-version : " 3.12"
98- - name : Install build tooling
99- run : python -m pip install --upgrade build twine
95+ enable-cache : true
10096 - name : Build distributions
101- run : python -m build
97+ run : uv build
10298 - name : Verify metadata renders
103- run : python -m twine check dist/*
99+ run : uv tool run --from twine twine check dist/*
104100 - name : Upload build artifacts
105101 uses : actions/upload-artifact@v4
106102 with :
0 commit comments