48
48
python -m pip install --upgrade pip
49
49
python -m pip install -r requirements/tests.txt
50
50
python -m pip install -r requirements/runtime.txt
51
- true
52
51
- name : Build sdist
53
52
shell : bash
54
53
run : |-
@@ -63,26 +62,30 @@ jobs:
63
62
run : |-
64
63
pwd
65
64
ls -al
65
+ # Run in a sandboxed directory
66
+ WORKSPACE_DNAME="testsrcdir_minimal_${CI_PYTHON_VERSION}_${GITHUB_RUN_ID}_${RUNNER_OS}"
67
+ mkdir -p $WORKSPACE_DNAME
68
+ cd $WORKSPACE_DNAME
69
+ # Run the tests
70
+ # Get path to installed package
66
71
MOD_DPATH=$(python -c "import xdoctest, os; print(os.path.dirname(xdoctest.__file__))")
67
72
echo "MOD_DPATH = $MOD_DPATH"
68
- python -m pytest -p pytester -p no:doctest --xdoctest --cov=xdoctest $MOD_DPATH ./tests
73
+ python -m pytest --cov={self.mod_name} $MOD_DPATH ../tests
74
+ cd ..
69
75
- name : Test full loose sdist
70
76
run : |-
71
77
pwd
72
78
ls -al
73
- python -m pip install -r requirements/optional.txt
74
79
true
75
- MOD_DPATH=$(python -c "import xdoctest, os; print(os.path.dirname(xdoctest.__file__))")
76
- echo "MOD_DPATH = $MOD_DPATH"
77
80
# Run in a sandboxed directory
78
- WORKSPACE_DNAME="testsrcdir_ ${CI_PYTHON_VERSION}_${GITHUB_RUN_ID}_${RUNNER_OS}"
81
+ WORKSPACE_DNAME="testsrcdir_full_ ${CI_PYTHON_VERSION}_${GITHUB_RUN_ID}_${RUNNER_OS}"
79
82
mkdir -p $WORKSPACE_DNAME
80
83
cd $WORKSPACE_DNAME
81
84
# Run the tests
82
85
# Get path to installed package
83
86
MOD_DPATH=$(python -c "import xdoctest, os; print(os.path.dirname(xdoctest.__file__))")
84
87
echo "MOD_DPATH = $MOD_DPATH"
85
- python -m pytest -p pytester -p no:doctest --xdoctest $MOD_DPATH ../tests
88
+ python -m pytest --cov={self.mod_name} $MOD_DPATH ../tests
86
89
cd ..
87
90
- name : Upload sdist artifact
88
91
uses : actions/upload-artifact@v3
@@ -94,69 +97,105 @@ jobs:
94
97
runs-on : ${{ matrix.os }}
95
98
strategy :
96
99
matrix :
97
- os :
98
- - windows-latest
99
- - ubuntu-latest
100
- - macOS-latest
101
- python-version :
102
- - ' 3.6'
103
- - ' 3.7'
104
- - ' 3.8'
105
- - ' 3.9'
106
- - ' 3.10'
107
- - ' 3.11'
108
- - pypy-3.7
109
- install-extras :
110
- - tests
111
- - tests,optional
112
100
arch :
113
101
- auto
114
102
include :
115
103
- python-version : ' 3.6'
116
- os : windows -latest
104
+ os : ubuntu -latest
117
105
install-extras : tests-strict,runtime-strict
118
- - python-version : ' 3.10 '
119
- os : windows -latest
106
+ - python-version : ' 3.6 '
107
+ os : macOS -latest
120
108
install-extras : tests-strict,runtime-strict
121
109
- python-version : ' 3.6'
122
110
os : windows-latest
111
+ install-extras : tests-strict,runtime-strict
112
+ - python-version : ' 3.11'
113
+ os : ubuntu-latest
123
114
install-extras : tests-strict,runtime-strict,optional-strict
124
- - python-version : ' 3.10'
115
+ - python-version : ' 3.11'
116
+ os : macOS-latest
117
+ install-extras : tests-strict,runtime-strict,optional-strict
118
+ - python-version : ' 3.11'
125
119
os : windows-latest
126
120
install-extras : tests-strict,runtime-strict,optional-strict
121
+ - python-version : ' 3.11'
122
+ os : macOS-latest
123
+ install-extras : tests
124
+ - python-version : ' 3.11'
125
+ os : windows-latest
126
+ install-extras : tests
127
127
- python-version : ' 3.6'
128
128
os : ubuntu-latest
129
- install-extras : tests-strict,runtime-strict
130
- - python-version : ' 3.10 '
129
+ install-extras : tests,optional
130
+ - python-version : ' 3.7 '
131
131
os : ubuntu-latest
132
- install-extras : tests-strict,runtime-strict
133
- - python-version : ' 3.6 '
132
+ install-extras : tests,optional
133
+ - python-version : ' 3.8 '
134
134
os : ubuntu-latest
135
- install-extras : tests-strict,runtime-strict,optional-strict
135
+ install-extras : tests,optional
136
+ - python-version : ' 3.9'
137
+ os : ubuntu-latest
138
+ install-extras : tests,optional
136
139
- python-version : ' 3.10'
137
140
os : ubuntu-latest
138
- install-extras : tests-strict,runtime-strict,optional-strict
141
+ install-extras : tests,optional
142
+ - python-version : ' 3.11'
143
+ os : ubuntu-latest
144
+ install-extras : tests,optional
139
145
- python-version : ' 3.6'
140
146
os : macOS-latest
141
- install-extras : tests-strict,runtime-strict
147
+ install-extras : tests,optional
148
+ - python-version : ' 3.7'
149
+ os : macOS-latest
150
+ install-extras : tests,optional
151
+ - python-version : ' 3.8'
152
+ os : macOS-latest
153
+ install-extras : tests,optional
154
+ - python-version : ' 3.9'
155
+ os : macOS-latest
156
+ install-extras : tests,optional
142
157
- python-version : ' 3.10'
143
158
os : macOS-latest
144
- install-extras : tests-strict,runtime-strict
145
- - python-version : ' 3.6 '
159
+ install-extras : tests,optional
160
+ - python-version : ' 3.11 '
146
161
os : macOS-latest
147
- install-extras : tests-strict,runtime-strict,optional-strict
162
+ install-extras : tests,optional
163
+ - python-version : ' 3.6'
164
+ os : windows-latest
165
+ install-extras : tests,optional
166
+ - python-version : ' 3.7'
167
+ os : windows-latest
168
+ install-extras : tests,optional
169
+ - python-version : ' 3.8'
170
+ os : windows-latest
171
+ install-extras : tests,optional
172
+ - python-version : ' 3.9'
173
+ os : windows-latest
174
+ install-extras : tests,optional
148
175
- python-version : ' 3.10'
176
+ os : windows-latest
177
+ install-extras : tests,optional
178
+ - python-version : ' 3.11'
179
+ os : windows-latest
180
+ install-extras : tests,optional
181
+ - python-version : pypy-3.7
182
+ os : ubuntu-latest
183
+ install-extras : tests,optional
184
+ - python-version : pypy-3.7
149
185
os : macOS-latest
150
- install-extras : tests-strict,runtime-strict,optional-strict
186
+ install-extras : tests,optional
187
+ - python-version : pypy-3.7
188
+ os : windows-latest
189
+ install-extras : tests,optional
151
190
steps :
152
191
- name : Checkout source
153
192
uses : actions/checkout@v3
154
193
- name : Enable MSVC 64bit
155
194
uses : ilammy/msvc-dev-cmd@v1
156
- if : matrix.os == 'windows-latest' && matrix.cibw_build != 'cp3 *-win32'
195
+ if : matrix.os == 'windows-latest' && matrix.cibw_skip == ' *-win32'
157
196
- name : Enable MSVC 32bit
158
197
uses : ilammy/msvc-dev-cmd@v1
159
- if : matrix.os == 'windows-latest' && matrix.cibw_build == 'cp3*-win32 '
198
+ if : matrix.os == 'windows-latest' && matrix.cibw_skip == '*-win_amd64 '
160
199
with :
161
200
arch : x86
162
201
- name : Set up QEMU
@@ -165,7 +204,7 @@ jobs:
165
204
with :
166
205
platforms : all
167
206
- name : Setup Python
168
- uses : actions/setup-python@v4.2 .0
207
+ uses : actions/setup-python@v4.3 .0
169
208
with :
170
209
python-version : ${{ matrix.python-version }}
171
210
- name : Build pure wheel
@@ -191,17 +230,15 @@ jobs:
191
230
# Get the path to the installed package and run the tests
192
231
MOD_DPATH=$(python -c "import xdoctest, os; print(os.path.dirname(xdoctest.__file__))")
193
232
echo "MOD_DPATH = $MOD_DPATH"
194
- # https://pytest-cov.readthedocs.io/en/latest/plugins.html
195
- # python2 hack
196
- COV_CORE_SOURCE="$MOD_DPATH" COV_CORE_CONFIG=../pyproject.toml COV_CORE_DATAFILE=.coverage.eager python -m pytest -p pytester -p no:doctest --xdoctest --cov-config ../pyproject.toml --cov-report html --cov-report term --cov-append --cov=xdoctest $MOD_DPATH ../tests || python -m pytest -p pytester -p no:doctest --xdoctest --cov-config ../pyproject.toml --cov-report term --cov=xdoctest $MOD_DPATH ../tests
233
+ python -m pytest -p pytester -p no:doctest --xdoctest --cov-config ../pyproject.toml --cov-report term --cov=xdoctest $MOD_DPATH ../tests
197
234
# Move coverage file to a new name
198
235
mv .coverage "../.coverage.$WORKSPACE_DNAME"
199
236
cd ..
200
237
- name : Show built files
201
238
shell : bash
202
239
run : ls -la wheelhouse
203
240
- name : Set up Python 3.8 to combine coverage Linux
204
- uses : actions/setup-python@v4.2 .0
241
+ uses : actions/setup-python@v4.3 .0
205
242
if : runner.os == 'Linux'
206
243
with :
207
244
python-version : 3.8
@@ -266,6 +303,7 @@ jobs:
266
303
$GPG_EXECUTABLE --list-keys || echo "first invocation of gpg creates directories and returns 1"
267
304
$GPG_EXECUTABLE --list-keys
268
305
VERSION=$(python -c "import setup; print(setup.VERSION)")
306
+ pip install twine
269
307
pip install urllib3 requests[security] twine
270
308
GPG_KEYID=$(cat dev/public_gpg_key)
271
309
echo "GPG_KEYID = '$GPG_KEYID'"
@@ -308,6 +346,7 @@ jobs:
308
346
$GPG_EXECUTABLE --list-keys || echo "first invocation of gpg creates directories and returns 1"
309
347
$GPG_EXECUTABLE --list-keys
310
348
VERSION=$(python -c "import setup; print(setup.VERSION)")
349
+ pip install twine
311
350
pip install urllib3 requests[security] twine
312
351
GPG_KEYID=$(cat dev/public_gpg_key)
313
352
echo "GPG_KEYID = '$GPG_KEYID'"
@@ -331,4 +370,4 @@ jobs:
331
370
# --secret=EROTEMIC_TWINE_USERNAME=$EROTEMIC_TWINE_USERNAME \
332
371
# --secret=EROTEMIC_CI_SECRET=$EROTEMIC_CI_SECRET \
333
372
# --secret=EROTEMIC_TEST_TWINE_USERNAME=$EROTEMIC_TEST_TWINE_USERNAME \
334
- # --secret=EROTEMIC_TEST_TWINE_PASSWORD=$EROTEMIC_TEST_TWINE_PASSWORD
373
+ # --secret=EROTEMIC_TEST_TWINE_PASSWORD=$EROTEMIC_TEST_TWINE_PASSWORD
0 commit comments