diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfd1ced16..7a3013261 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,6 +78,64 @@ jobs: dist/${{ steps.artifact-name.outputs.wheel }} retention-days: 5 + - name: >- + Smoke-test: + retrieve the project source from an sdist inside the GHA artifact + uses: re-actors/checkout-python-sdist@release/v2 + with: + source-tarball-name: ${{ steps.artifact-name.outputs.sdist }} + workflow-artifact-name: ${{ env.dists-artifact-name }} + + - name: >- + Smoke-test: move the sdist-retrieved dir into sdist-src + run: | + mv -v '${{ github.workspace }}' '${{ runner.temp }}/sdist-src' + mkdir -pv '${{ github.workspace }}' + mv -v '${{ runner.temp }}/sdist-src' '${{ github.workspace }}/sdist-src' + shell: bash -eEuo pipefail {0} + + - name: >- + Smoke-test: grab the source from Git into git-src + uses: actions/checkout@v4 + with: + path: git-src + + - name: >- + Smoke-test: install test requirements from the Git repo + run: >- + python -Im + pip install -c test-requirements.txt -r test-requirements.txt + shell: bash -eEuo pipefail {0} + working-directory: git-src + + - name: >- + Smoke-test: collect tests from the Git repo + env: + PYTHONPATH: src/ + run: >- + pytest --collect-only -qq . + | sort + | tee collected-tests + shell: bash -eEuo pipefail {0} + working-directory: git-src + + - name: >- + Smoke-test: collect tests from the sdist tarball + env: + PYTHONPATH: src/ + run: >- + pytest --collect-only -qq . + | sort + | tee collected-tests + shell: bash -eEuo pipefail {0} + working-directory: sdist-src + + - name: >- + Smoke-test: + verify that all the tests from Git are included in the sdist + run: diff --unified sdist-src/collected-tests git-src/collected-tests + shell: bash -eEuo pipefail {0} + Windows: name: 'Windows (${{ matrix.python }}, ${{ matrix.arch }}${{ matrix.extra_name }})' needs: