Skip to content

Commit

Permalink
CI: installing the minimal versions of the dependencies in the test p…
Browse files Browse the repository at this point in the history
…ipeline, to ensure that they remain compatible (#1320)
  • Loading branch information
Lucas-C authored Dec 8, 2024
1 parent 6322c62 commit 234cc33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ jobs:
grep -IRF generate=True test/ && exit 1
# Executing all tests:
pytest -vv --trace-memory-usage
- name: Running tests with the minimal versions of fpdf2 direct dependencies ☑
if: matrix.python-version == '3.8' && matrix.platform == 'ubuntu-latest'
run: |
# We ensure that those minimal versions remain compatible:
sed -i '/install_requires/,/\n/s/>=/==/' setup.cfg
pip install .
# Targetting only a subset of tests because: A) it's faster and B) some tests are dependant on a specific version of fonttools or Pillow
pytest -vv test/barcodes test/drawing test/errors test/image/test_load_image.py test/metadata test/shapes test/signing test/text_region test/utils
- name: Uploading coverage report to codecov.io ☑
if: matrix.python-version == '3.12' && matrix.platform == 'ubuntu-latest'
run: bash <(curl -s https://codecov.io/bash)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ keywords =
[options]
packages =
fpdf
python_requires = >=3.7
install_requires =
defusedxml
Pillow>=6.2.2,!=9.2.* # minimum version tested there: https://github.com/py-pdf/fpdf2/actions/runs/2295868575
# Version 9.2.0 is excluded due to DoS vulnerability with TIFF images: https://github.com/py-pdf/fpdf2/issues/628
# Version exclusion explained here: https://devpress.csdn.net/python/630462c0c67703293080c302.html
fonttools>=4.34.0
python_requires = >=3.7

[bdist_wheel]
universal = 1
Expand Down

0 comments on commit 234cc33

Please sign in to comment.