pmaupin / pdfrw

pdfrw is a pure Python library that reads and writes PDFs
Other
1.86k stars 271 forks source link

Update Travis CI #207

Open edumco opened 4 years ago

edumco commented 4 years ago

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.txt was 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

import static_pdfs

Now

from test import static_pdfs