This repository was archived by the owner on Oct 23, 2025. It is now read-only.
Add Travis CI config for testing and linting#41
Open
laymonage wants to merge 3 commits intomarceloFA:masterfrom
Open
Add Travis CI config for testing and linting#41laymonage wants to merge 3 commits intomarceloFA:masterfrom
laymonage wants to merge 3 commits intomarceloFA:masterfrom
Conversation
Owner
|
Greta PR! Thanks so much for helping out :D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With this config, the project is tested on Travis CI with Python 3.6, 3.7, and 3.8 (+ linted on 3.8) on every push. It will also check for code coverage and upload the result to codecov. Badges for the Travis build and code coverage will appear on
README.md.You'll need to:
CODECOV_TOKENNormally, step 3 shouldn't be required for public repositories, but Travis CI for public projects is moving from travis-ci.org to travis-ci.com and it seems that Codecov hasn't picked up on that, so you have to set the token as if it's a private repository.
Hopefully, this can help to alert regressions such as this commit that fails this test.
To add prevention locally, I can add a pre-commit git hook using pre-commit so that
black .andpython manage.py testis run before every commit. However, this would add another dependency and creating the first commit after this change would need an internet connection. If you're okay with that, I'd be happy to create another PR.