Skip to content

Commit

Permalink
fixup! Add an sdist test inclusion smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Dec 20, 2024
1 parent eb0170a commit ef04096
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ef04096

Please sign in to comment.