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
Use GitHub Actions for CI #92
Conversation
Codecov Report
@@ Coverage Diff @@
## master #92 +/- ##
==========================================
- Coverage 85.36% 85.02% -0.34%
==========================================
Files 45 44 -1
Lines 2425 2371 -54
==========================================
- Hits 2070 2016 -54
Misses 355 355
Continue to review full report at Codecov.
|
89051f5
to
545d797
Compare
I have played around with this on my own implementation, and have set it up for |
53d3ce2
to
1292317
Compare
Ah, I seem to have lost the point of re-introducing |
They perform different functions no? I'm happy with running the pre-commit here too, but a blackened repo isn't necessarily flake8 compliant. We could also add e.g. pylint on top of flake8 to detect further bad code smells. |
Re-introduce requirements.txt with static versions for base dependencies. Create three different dependency GitHub Actions jobs: - static - eager - as user
Ah, didn't know this. Yeah sure. I'll add it in again. |
This looks good, but now we've veered into replacing travis entirely (fine). Do we know how to prevent a particular step from blocking a merge (e.g. the future deps)? If we want to go all the way with this, codecov can be added to the gh action too. |
True. But maybe that's fine? We just need to know how to move releasing over as well...
codecov can indeed be added, using codecov-action. |
Oh, that's interesting, I assumed it would be unlimited use (of course, until they have everyone using it...) In that case your suggestion sounds sensible! |
Nope. See here. |
The 2k limit is for private repos |
My mistake - glitch-reading the page. Thanks for the eye-opener. |
I've updated the description of this PR, so please "review" that too, but I think this is now ready to go. We still need to update the installation and contributing instructions, I'll add that to the other PR over at #68. |
I agree. In particular, I suggest we have a
After some thought, I agree. Especially since I saw that django just release v3 the other day. Having this stay at v2 for this test absolutely makes sense. For the one mentioned below, however, it is essential that we install the very latest.
|
Btw, I will add the "publish on PyPI" workflow in another PR. I think that's better? However that also means that between this as that, the repository looses the ability to auto-publish on valid tag pushes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with this.
In order to accommodate our latest wishes, requirements.txt
needs to be updated with django>=2.*
or django~=2
or something similar. I am not exactly sure what is correct to make sure all minor version are updated, but the major is not.
If we update the setup.py
with restrictive versions, the eager
test will not run properly, I think.
I think maybe django>=2,<3 will work?
Yes, we end up back in the scenario of multiple requirements files... Since the backends only require only one package each, we could hardcode the pip installation of the latest version in the eager tests? |
I have looked more into this. We can use This notation is quite minimalist, which I like, but at the same time, it may not be very informative to the uninitiated. So I would probably update
Let's just not do my suggestion here? And hardcoding fails to meet the automation aspect of the workflow job, I think? |
Ah sorry, misunderstood your comment. I thought by restrictive versioning you were referring to your own suggestion. I'll do this now. |
Ah, yeah. I kind of was. But I was thinking of adding these things to |
- Restricted versions of backends to major versions in setup.py - Added pinned versions of backends to requirements.txt - Moved requirements.txt to be CI specific
Co-Authored-By: Casper Welzel Andersen <43357585+CasperWA@users.noreply.github.com>
I tried to be clever. I started to write a script to update the requirements files if |
Another question I have pondered: Should we truly be eager in the upgrade and remove all constraints, or should we keep to what the workflow is set up for now, i.e. keep the constraint for I guess this comes down to, what is the real purpose of the eager test job? |
Honestly, I would remove pydantic as an eager requirement altogether, so we instead are testing whether we support the latest version that FastAPI also supports (currently FastAPI has I'll make this change now, then I really think we should merge this as it is going to hold up other PRs (the checks in this PR are now required but cannot run on the others!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! And I agree about pydantic
and the purpose of the eager test.
Thanks a lot @ml-evs for starting and doing this PR. It was quite helpful for myself to learn Actions :)
This PR was initially created to add linting to our repo separately to travis, and it has now evolved into the following changes, authored jointly with @CasperWA:
On all PRs, and pushes to master, the following will run:
flake8
:pre-commit
(which only runs black at the moment)