snapshottest
snapshottest copied to clipboard
Migrate CI from Travis to GitHub Actions
The CI on Travis isn't running anymore, I tried to replicate the existing setup as much as possible in GitHub actions.
In the process, I realised that the supported versions are quite out of date, and more work will bed needed to bring the project up to date, but I consider this to be a separate piece of work, out of scope of what I'm trying to achieve here. I tried to minimise the amount of code changes.
Things to note:
- I've dropped Python 3.5. As far as I remember, it's not trivial to run this version on GitHub actions.
- I've left Python 3.6 despite being EOL for a while. This requires an older version of ubuntu, dropping it would simplify a bit the matrix. Python 3.7 is also EOL, but is trivial to keep in the matrix.
- I didn't try to add any new versions of Python of Django
- Coveralls didn't work
- The black job was failing as it doesn't support Click 8, I didn't try to update the latest version of black, as it might bring in more code changes. I restricted Click to v7.
- There was one flake8 error, which I fixed
- Django 4+ doesn't pass the tests, mainly because the example uses
from django.conf.urls import url
, which has been removed. I decided to restrict the Django version to <4 to minimise code changes.
FYI @paulmelnikow, should help with maintainability 😄