hynek / pem

PEM file parsing in Python.
https://pem.readthedocs.io/
MIT License
156 stars 37 forks source link

Add a tox env for local pre-CI tetsts #47

Closed adiroiban closed 3 years ago

adiroiban commented 3 years ago

I think that it would help to have a tox env that will run as many tests as possible on the local systems.

Right now tox -e py38-twisted will run the tests, but it will not check for coverage.

My notes for the tools to run before asking for a review.

   $ coverage erase
   $ coverage run -m pytest
   $ coverage combine; coverage xml; diff-cover coverage.xml
   $ flake8 setup.py src/
   # mypy exected only on the source code, without tests and build system.
   $ mypy src/
   # Run automatic code formating on any python file from the repo.
   $ black .
   $ isort
   $ check-manifest

It would be nice tot have a tox -e tests that will run all tests based on your current python version.

hynek commented 3 years ago

All of that will run, if you just run tox without any arguments tho?

adiroiban commented 3 years ago

The problem is that tox or tox -p all includes a lot of envs that will fail since I don't have all the python versions installed.

But, yes, using tox with the default arguments is an option.... if we remove specific python version tests and run the tests with the default python... and also use the default python for docs.

Right now docs fails as I don't have python 3.7

coverage-reports will not work in parallel, as it should be called last :)

I will try to push a PR and see if it's better.

Thanks!

hynek commented 3 years ago

There is a solution to your woes dear Adi!

https://tox.readthedocs.io/en/latest/config.html#conf-skip_missing_interpreters

adiroiban commented 3 years ago

Sorry for the noise. This can be closed :)