Update Travis CI#207
Conversation
| @@ -0,0 +1,14 @@ | |||
| # Theese dependencies where tested on Python 2.7.18 to 3.8.2 | |||
There was a problem hiding this comment.
It may be more clear & standard to rename this file test-requirements.txt?
| - 2.7 # Trusty LTS | ||
| - 3.5 # Xenial LTS | ||
| - 3.6 # Bionic LTS | ||
| - 3.8 # Focal LTS |
|
|
||
| before_install: | ||
| - "git clone https://github.com/pmaupin/static_pdfs tests/static_pdfs" | ||
| - pip install --upgrade pip |
There was a problem hiding this comment.
This may be done in one command call instead of 3
| script: | ||
| - cd tests; /usr/bin/env PYTHONPATH=. py.test | ||
|
|
||
| cache: |
| @@ -23,7 +23,7 @@ examples/poster_881f4dc8dcf069e707bf61af95492d86 a34be06d22105b6c02394a9f | |||
| examples/rl1/4up_b1c400de699af29ea3f1983bb26870ab e21dfdd9ae56ddb261dc3d02bf6da198 | |||
There was a problem hiding this comment.
They where not working and i could not make them work correctly. Can you try to run this?
| reportlab>=3.5.46 | ||
| Pillow>=6.2.2 | ||
|
|
||
| # Test dependencies (Pytest runs tests faster in parallel unsin the -n option) |
There was a problem hiding this comment.
Given this comment, why not using -n in the .travis.yml file?
| @@ -1,20 +1,28 @@ | |||
| language: python | |||
There was a problem hiding this comment.
It may be better to transform this into a GitHub Actions YAML file now that Travis does not provide free execution time for open source projects anymore :(
There was a problem hiding this comment.
I just did that so how would both of you like to give some feedback over here? https://github.com/sarnold/pdfrw
Thanks!
This PR brings several important changes
A new list of Python versions
Although it is possible to support all Python versions it become harder and harder every day. So, I've selected that are present in Ubuntu versions that have a long term support (LTS)
Each LTS has a long life in support from canonical from 5 to 10 years and comes with a default Python:
Even with the EOL of Python 2.7, 3.5 and 3.6 it will be possible to run these machines for a long time (at their own risk).
Pytest parallel execution
Pytest allows you to run tests tests in parallel reducing the total execution time. I've fixed the number of jobs to 4 because the runners normally have 2 virtual cores and it is a good practice to use 2 threads per core (maximum)
Requirements File
A
requirements.txtwas add to make clear what are the dependencies on the project.It was created using a python2.7 version so only the minimum requirements versions are defined for now.
Disabled a bunch of failing tests
Its been so long since the last successful build on Travis that the failing tests could be caused by many causes.
I believe all testes should be manually reviewed so I did not open individual issues.
Update PDFs imports
I changed the import format to make tests pass on newer Python versions (especially 3.8)
Before
Now