@@ -134,7 +134,8 @@ jobs:
134
134
architecture : ' x64'
135
135
136
136
- name : Validate Python Environment
137
- run : echo "import sys; print('Python %s on %s in %s' % (sys.version, sys.platform, sys.getdefaultencoding()))" | python
137
+ run : import sys; print('Python %s on %s in %s' % (sys.version, sys.platform, sys.getdefaultencoding()))
138
+ shell : python
138
139
139
140
- name : Install poetry
140
141
# see https://github.com/marketplace/actions/setup-poetry
@@ -165,3 +166,34 @@ jobs:
165
166
name : ${{ env.REPORTS_ARTIFACT }}
166
167
path : ${{ env.REPORTS_DIR }}
167
168
if-no-files-found : error
169
+
170
+ build-and-run-examples :
171
+ name : Examples
172
+ runs-on : ubuntu-latest
173
+ timeout-minutes : 15
174
+ strategy :
175
+ fail-fast : false
176
+ steps :
177
+ - name : Checkout
178
+ # see https://github.com/actions/checkout
179
+ uses : actions/checkout@v3
180
+ - name : Setup Python Environment
181
+ # see https://github.com/actions/setup-python
182
+ uses : actions/setup-python@v4
183
+ with :
184
+ python-version : ' >=3.7 <=3.11' # supported version range
185
+ - name : Validate Python Environment
186
+ run : import sys; print('Python %s on %s in %s' % (sys.version, sys.platform, sys.getdefaultencoding()))
187
+ shell : python
188
+ - name : Install poetry
189
+ # see https://github.com/marketplace/actions/setup-poetry
190
+ uses : Gr1N/setup-poetry@v8
191
+ with :
192
+ poetry-version : ${{ env.POETRY_VERSION }}
193
+ - name : Install project
194
+ run : poetry install
195
+ - name : run all examples
196
+ run : >
197
+ find examples -type f -name '*.py' -print0
198
+ | xargs -0 -L1 -t
199
+ poetry run python
0 commit comments