Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate CI from Travis to GitHub Actions #172

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

browniebroke
Copy link

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.

Comment on lines +3 to +5
on:
push:
pull_request:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workflows added from a fork don't run by default (for security reasons) but you can check the results on my fork: https://github.com/browniebroke/snapshottest/actions

You probably want to disable CI on pushes to non-master branch before merging:

Suggested change
on:
push:
pull_request:
on:
push:
branches:
- master
pull_request:

@browniebroke
Copy link
Author

FYI @paulmelnikow, should help with maintainability 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant