Skip to content

Commit

Permalink
DEV: Modify CI to better verify built package contents (#1244)
Browse files Browse the repository at this point in the history
PR modifies the package CI job in two ways:

1. Pass package to check-wheel-contents. This makes it so that check-wheel-contents verifies that each file in the package are actually in the wheel following their directory structure.
2. Have CI steps that verify we can install the package, and that we can run a minimal example with it 

Either of these steps would have been sufficient to have caught #1242 per the example runs above.

Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
  • Loading branch information
MasterOdin authored Aug 17, 2022
1 parent 917ff2e commit 28cf36a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/github-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ jobs:
- run: check-wheel-contents dist/*.whl
- name: Check long_description
run: python -m twine check dist/*

- name: Test installing package
run: python -m pip install .

- name: Test running installed package
working-directory: /tmp
run: python -c "import PyPDF2;print(PyPDF2.__version__)"

# - name: Release to pypi if tagged.
# if: startsWith(github.ref, 'refs/tags')
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ crypto = PyCryptodome
backup = False
runner = ./mutmut-test.sh
tests_dir = tests/

[tool:check-wheel-contents]
package = ./PyPDF2

0 comments on commit 28cf36a

Please sign in to comment.