@@ -85,11 +85,40 @@ jobs:
8585
8686 - name : Install dependencies
8787 run : |
88- uv pip install --system .[dev] "pytest-xdist==3.*"
88+ uv pip install --system .[dev]
8989
9090 - name : Run tests
9191 run : pytest -v -p no:warnings --numprocesses=auto
9292
93+ test-examples :
94+ runs-on : ubuntu-24.04
95+ timeout-minutes : 45
96+ needs : lint
97+ # Only run examples on releases (tags)
98+ if : startsWith(github.ref, 'refs/tags/v')
99+
100+ steps :
101+ - name : Check out code
102+ uses : actions/checkout@v5
103+
104+ - name : Set up uv
105+ uses : astral-sh/setup-uv@v6
106+ with :
107+ version : " 0.8.19"
108+ enable-cache : true
109+
110+ - name : Set up Python ${{ env.PYTHON_VERSION }}
111+ uses : actions/setup-python@v6
112+ with :
113+ python-version : ${{ env.PYTHON_VERSION }}
114+
115+ - name : Install dependencies
116+ run : |
117+ uv pip install --system .[dev]
118+
119+ - name : Run example tests
120+ run : pytest -v -p no:warnings -m examples
121+
93122 security :
94123 name : Security Scan
95124 runs-on : ubuntu-24.04
@@ -129,7 +158,7 @@ jobs:
129158 runs-on : ubuntu-24.04
130159 permissions :
131160 contents : write
132- needs : [lint, test, security]
161+ needs : [lint, test, test-examples, security]
133162 if : startsWith(github.ref, 'refs/tags/v')
134163
135164 steps :
@@ -168,7 +197,7 @@ jobs:
168197 publish-testpypi :
169198 name : Publish to TestPyPI
170199 runs-on : ubuntu-24.04
171- needs : [test, create-release] # Run after tests and release creation
200+ needs : [test, test-examples, create-release] # Run after tests and release creation
172201 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') # Only on tag push
173202 environment :
174203 name : testpypi
0 commit comments