@@ -170,6 +170,83 @@ jobs:
170
170
run : |
171
171
tox -e black-check,isort-check,pyupgrade,checks,import-timings,lint,pylint,mypy
172
172
173
+ build_test_release_artifact :
174
+ name : Build and Test Release Artifact
175
+ runs-on : ubuntu-latest
176
+
177
+ strategy :
178
+ matrix :
179
+ python_version : [3.9]
180
+
181
+ steps :
182
+ - uses : actions/checkout@master
183
+ with :
184
+ fetch-depth : 1
185
+
186
+ - name : Use Python ${{ matrix.python_version }}
187
+ uses : actions/setup-python@v5
188
+ with :
189
+ python-version : ${{ matrix.python_version }}
190
+
191
+ - name : Cache Python Dependencies
192
+ uses : actions/cache@v4
193
+ with :
194
+ path : ~/.cache/pip
195
+ key : ${{ runner.os }}-pip-${{ hashFiles('requirements-lint.txt') }}
196
+ restore-keys : |
197
+ ${{ runner.os }}-pip-
198
+
199
+ - name : Install Python Dependencies
200
+ run : |
201
+ pip install -r requirements-ci.txt
202
+ pip install "build==1.2.2"
203
+
204
+ - name : Build Release Artifact
205
+ run : |
206
+ pip list installed
207
+ python -m build -vv
208
+
209
+ - name : Set Environment
210
+ run : |
211
+ export PYTHONPATH=.
212
+ export VERSION=$(python -c "import libcloud ; print(libcloud.__version__)")
213
+ echo "VERSION=${VERSION}" >> "$GITHUB_ENV"
214
+
215
+ - name : Verify Tarball Release Artifact
216
+ run : |
217
+ # Verify tarball file exists
218
+ export TARBALL_FILENAME="apache_libcloud-${VERSION}.tar.gz"
219
+
220
+ ls -la "dist/${TARBALL_FILENAME}"
221
+
222
+ cd dist/
223
+
224
+ # Unpack tarball and verify + run the tests
225
+ tar -xzvf "${TARBALL_FILENAME}"
226
+
227
+ cd "apache_libcloud-${VERSION}/"
228
+ tox -c tox.ini -epy3.9
229
+
230
+ - name : Verify Wheel Release Artifact
231
+ run : |
232
+ # Verify wheel file exists
233
+ export WHEEL_FILENAME="apache_libcloud-${VERSION}-py3-none-any.whl"
234
+
235
+ ls -la "dist/${WHEEL_FILENAME}"
236
+
237
+ cd dist/
238
+
239
+ # Unpack wheel and verify + run tests
240
+ unzip "${WHEEL_FILENAME}" -d "wheel"
241
+ cd wheel
242
+
243
+ # Since wheel doesn't include those files, we need to manually copy them over from
244
+ # repo root so we can run the tests
245
+ cp ../../tox.ini .
246
+ cp ../../requirements-tests.txt .
247
+ cp ../../libcloud/test/secrets.py-dist libcloud/test/secrets.py-dist
248
+ tox -c tox.ini -epy3.9
249
+
173
250
build_test_docker_image :
174
251
name : Build and Verify Docker Image
175
252
runs-on : ubuntu-latest
0 commit comments