sphinx-contrib / images

sphinxcontrib-images extension
Apache License 2.0
17 stars 14 forks source link

add GitHub actions config to replace Travis CI #21

Closed terencehonles closed 3 years ago

terencehonles commented 3 years ago

It looks like actions would need to be enabled, but you can see the runs in my fork https://github.com/terencehonles/sphinx-contrib-images/actions/

terencehonles commented 3 years ago

That required a number of test runs, but this one is running all the right factors https://github.com/terencehonles/sphinx-contrib-images/actions/runs/759549582, I can back out https://github.com/sphinx-contrib/images/pull/21/commits/b3224f161a5c7409e20898861976783bc0a5252f if you'd like to keep the different sphinx runs separate, but otherwise I think having a run per Python version is probably sufficient.

jonascj commented 3 years ago

Great, I've wanted to look at GitHub actions since November 2020.

I would like to test against major versions of Sphinx that the package is claimed to work with in setup.py. If we do not do so, we risk adding or removing code which breaks the package for old versions of Sphinx. make -C docs html in tox.ini is that integration test, ensuring combinations of Python, Sphinx and sphinxcontrib-images can produce html output.

setup.py appears to need an update as well. I think we should stop testing with Python 2 and maybe that requires us to stop supporting Sphinx 1.8 (which is alright I'd say).

terencehonles commented 3 years ago

The config for either PR runs tox for the following Python versions: 2.7, 3.6, 3.7, 3.8, 3.9, pypy-2.7, and pypy-3.7

Which will run against all the Sphinx versions: 1.8.5, 2.0.1, 2.1.2, 2.2.2, 2.3.1, 2.4.4, 3.0.0, and 3.2.1

I also added latest which will be whatever is most recently released to PyPI so the list doesn't need to be updated manually as much. I can add more Sphinx versions as needed, but it might make sense to be dropping versions too. Either of these can be done in a separate PR and are as simple as adding Sphinx versions to tox in the final form of this PR or if you want to keep the runs separate it would require also touching the workflow YAML file.

So with that context I believe this PR already does everything you ask for and we probably should put any maintenance as a separate task. You'll also want to enable actions for PR forks if you want this to run for PRs from external contributors.

terencehonles commented 3 years ago

I guess the only thing I didn't capture is dropping Python 2. So if that's what you want I can remove that from the test matrix and also the setup.py. For dropping Python 2 that would also be pyp2, right?

If we're doing that maintenance in this PR, then we probably should also drop Python 3.4 and Python 3.5 which are EoL and not part of the test matrix, but included in setup.py.

terencehonles commented 3 years ago

I noticed and fixed a typo :sweat_smile:

jonascj commented 3 years ago

Alright, I misunderstood the "7 jobs completed" message and your description of "having a run per Python version", it indeed runs 56-something tests.