17
17
- name : Checkout source
18
18
uses : actions/checkout@v3
19
19
- name : Set up Python 3.8
20
- uses : actions/setup-python@v4.3 .0
20
+ uses : actions/setup-python@v4.5 .0
21
21
with :
22
22
python-version : 3.8
23
23
- name : Install dependencies
40
40
- name : Checkout source
41
41
uses : actions/checkout@v3
42
42
- name : Set up Python 3.8
43
- uses : actions/setup-python@v4.3 .0
43
+ uses : actions/setup-python@v4.5 .0
44
44
with :
45
45
python-version : 3.8
46
46
- name : Upgrade pip
@@ -97,96 +97,123 @@ jobs:
97
97
runs-on : ${{ matrix.os }}
98
98
strategy :
99
99
matrix :
100
- arch :
101
- - auto
102
100
include :
103
101
- python-version : ' 3.6'
104
- os : ubuntu-latest
102
+ os : ubuntu-20.04
105
103
install-extras : tests-strict,runtime-strict
104
+ arch : auto
106
105
- python-version : ' 3.6'
107
106
os : macOS-latest
108
107
install-extras : tests-strict,runtime-strict
108
+ arch : auto
109
109
- python-version : ' 3.6'
110
110
os : windows-latest
111
111
install-extras : tests-strict,runtime-strict
112
+ arch : auto
112
113
- python-version : ' 3.11'
113
114
os : ubuntu-latest
114
115
install-extras : tests-strict,runtime-strict,optional-strict
116
+ arch : auto
115
117
- python-version : ' 3.11'
116
118
os : macOS-latest
117
119
install-extras : tests-strict,runtime-strict,optional-strict
120
+ arch : auto
118
121
- python-version : ' 3.11'
119
122
os : windows-latest
120
123
install-extras : tests-strict,runtime-strict,optional-strict
124
+ arch : auto
121
125
- python-version : ' 3.11'
122
126
os : macOS-latest
123
127
install-extras : tests
128
+ arch : auto
124
129
- python-version : ' 3.11'
125
130
os : windows-latest
126
131
install-extras : tests
132
+ arch : auto
127
133
- python-version : ' 3.6'
128
- os : ubuntu-latest
134
+ os : ubuntu-20.04
129
135
install-extras : tests,optional
136
+ arch : auto
130
137
- python-version : ' 3.7'
131
138
os : ubuntu-latest
132
139
install-extras : tests,optional
140
+ arch : auto
133
141
- python-version : ' 3.8'
134
142
os : ubuntu-latest
135
143
install-extras : tests,optional
144
+ arch : auto
136
145
- python-version : ' 3.9'
137
146
os : ubuntu-latest
138
147
install-extras : tests,optional
148
+ arch : auto
139
149
- python-version : ' 3.10'
140
150
os : ubuntu-latest
141
151
install-extras : tests,optional
152
+ arch : auto
142
153
- python-version : ' 3.11'
143
154
os : ubuntu-latest
144
155
install-extras : tests,optional
156
+ arch : auto
145
157
- python-version : ' 3.6'
146
158
os : macOS-latest
147
159
install-extras : tests,optional
160
+ arch : auto
148
161
- python-version : ' 3.7'
149
162
os : macOS-latest
150
163
install-extras : tests,optional
164
+ arch : auto
151
165
- python-version : ' 3.8'
152
166
os : macOS-latest
153
167
install-extras : tests,optional
168
+ arch : auto
154
169
- python-version : ' 3.9'
155
170
os : macOS-latest
156
171
install-extras : tests,optional
172
+ arch : auto
157
173
- python-version : ' 3.10'
158
174
os : macOS-latest
159
175
install-extras : tests,optional
176
+ arch : auto
160
177
- python-version : ' 3.11'
161
178
os : macOS-latest
162
179
install-extras : tests,optional
180
+ arch : auto
163
181
- python-version : ' 3.6'
164
182
os : windows-latest
165
183
install-extras : tests,optional
184
+ arch : auto
166
185
- python-version : ' 3.7'
167
186
os : windows-latest
168
187
install-extras : tests,optional
188
+ arch : auto
169
189
- python-version : ' 3.8'
170
190
os : windows-latest
171
191
install-extras : tests,optional
192
+ arch : auto
172
193
- python-version : ' 3.9'
173
194
os : windows-latest
174
195
install-extras : tests,optional
196
+ arch : auto
175
197
- python-version : ' 3.10'
176
198
os : windows-latest
177
199
install-extras : tests,optional
200
+ arch : auto
178
201
- python-version : ' 3.11'
179
202
os : windows-latest
180
203
install-extras : tests,optional
204
+ arch : auto
181
205
- python-version : pypy-3.7
182
206
os : ubuntu-latest
183
207
install-extras : tests,optional
208
+ arch : auto
184
209
- python-version : pypy-3.7
185
210
os : macOS-latest
186
211
install-extras : tests,optional
212
+ arch : auto
187
213
- python-version : pypy-3.7
188
214
os : windows-latest
189
215
install-extras : tests,optional
216
+ arch : auto
190
217
steps :
191
218
- name : Checkout source
192
219
uses : actions/checkout@v3
@@ -204,7 +231,7 @@ jobs:
204
231
with :
205
232
platforms : all
206
233
- name : Setup Python
207
- uses : actions/setup-python@v4.3 .0
234
+ uses : actions/setup-python@v4.5 .0
208
235
with :
209
236
python-version : ${{ matrix.python-version }}
210
237
- name : Build pure wheel
@@ -220,25 +247,33 @@ jobs:
220
247
CI_PYTHON_VERSION : py${{ matrix.python-version }}
221
248
run : |-
222
249
# Find the path to the wheel
223
- WHEEL_FPATH=$(ls wheelhouse/xdoctest*.whl)
224
- # Install the wheel
225
- python -m pip install ${WHEEL_FPATH}[${INSTALL_EXTRAS}]
250
+ ls wheelhouse
251
+ pip install tomli pkginfo
252
+ MOD_NAME=xdoctest
253
+ echo "MOD_NAME=$MOD_NAME"
254
+ WHEEL_FPATH=$(python -c "import pathlib; print(str(sorted(pathlib.Path('wheelhouse').glob('$MOD_NAME*.whl'))[-1]).replace(chr(92), chr(47)))")
255
+ echo "WHEEL_FPATH=$WHEEL_FPATH"
256
+ MOD_VERSION=$(python -c "from pkginfo import Wheel; print(Wheel('$WHEEL_FPATH').version)")
257
+ echo "MOD_VERSION=$MOD_VERSION"
258
+ # Install the wheel (ensure we are using the version we just built)
259
+ # NOTE: THE VERSION MUST BE NEWER THAN AN EXISTING PYPI VERSION OR THIS MAY FAIL
260
+ pip install "$MOD_NAME[$INSTALL_EXTRAS]==$MOD_VERSION" -f wheelhouse
226
261
# Create a sandboxed directory
227
262
WORKSPACE_DNAME="testdir_${CI_PYTHON_VERSION}_${GITHUB_RUN_ID}_${RUNNER_OS}"
228
263
mkdir -p $WORKSPACE_DNAME
229
264
cd $WORKSPACE_DNAME
230
265
# Get the path to the installed package and run the tests
231
266
MOD_DPATH=$(python -c "import xdoctest, os; print(os.path.dirname(xdoctest.__file__))")
232
267
echo "MOD_DPATH = $MOD_DPATH"
233
- python -m pytest -p pytester -p no:doctest --xdoctest --cov-config ../pyproject.toml --cov-report term --cov=xdoctest $MOD_DPATH ../tests
268
+ python -m pytest -p pytester -p no:doctest --xdoctest --cov-config ../pyproject.toml --cov-report term --cov="$MOD_NAME" " $MOD_DPATH" ../tests
234
269
# Move coverage file to a new name
235
270
mv .coverage "../.coverage.$WORKSPACE_DNAME"
236
271
cd ..
237
272
- name : Show built files
238
273
shell : bash
239
274
run : ls -la wheelhouse
240
275
- name : Set up Python 3.8 to combine coverage Linux
241
- uses : actions/setup-python@v4.3 .0
276
+ uses : actions/setup-python@v4.5 .0
242
277
if : runner.os == 'Linux'
243
278
with :
244
279
python-version : 3.8
0 commit comments