Build and smoke-test the sdist in CI
Build and smoke-test the source distribution in CI to prevent packaging
errors.
Fixes
@@ -43,6 +43,24 @@ jobs:
dist/*.whl
dist/*.tar.gz
+ test_sdist:
+ name: Test the source distribution (sdist)
+ needs: build_release
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-python@v4
+ with:
+ python-version: "3.10"
+ - uses: actions/download-artifact@v3
+ with:
+ name: cocotb-dist
+ path: dist
+ - name: Install nox
+ run: python3 -m pip install nox
+ - name: Smoke-test the sdist
+ run: nox -s release_test_sdist
+
test_release:
name: Regression Tests
needs: build_release
@@ -55,7 +73,9 @@ jobs:
deploy_pypi:
name: Deploy to pypi.org
- needs: test_release
+ needs:
+ - test_release
+ - test_sdist
runs-on: ubuntu-20.04
# Only upload tagged releases.
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
