-
Notifications
You must be signed in to change notification settings - Fork 265
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
Add nox to run test and environment #516
Conversation
Codecov Report
@@ Coverage Diff @@
## master #516 +/- ##
=======================================
Coverage 96.15% 96.15%
=======================================
Files 21 21
Lines 2837 2837
Branches 527 527
=======================================
Hits 2728 2728
Misses 48 48
Partials 61 61
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
dcc9bef
to
d09397e
Compare
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.
This is a great improvement – doing string manipulation in Make was getting totally out of hand. But it's interesting how different Nox' push-style notifications are from Make's pull-style dependencies.
Anyway, I have lots of comments. Including some errors, particularly about the TEST_OPTS
variable that has been removed (good!) but not completely.
At some point, the administration tasks like adding copyright headers or the release-check could also be Noxified/Pythonized like this.
Remove requirements.txt
Remove doc/requirements.txt
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.
I think this is now in a state that can be merged. But as always, various comments :)
Co-authored-by: Lukas Atkinson <opensource@LukasAtkinson.de>
Fix test of documentation: There was a old call of make with the message "make: Nothing to be done for 'doc'." because the makefile was removed with gcovr#516.
- Use ENTRYPOINT instead of CMD in Dockerfile to be able to use arguments for nox. - Remove the internal environment variables NOX_POSARGS and NOX_OPTIONS. This are superfluous with ENTRYPOINT. - Rename the sessions to build and run the container - docker_qa_build* -> docker_build* - docker_qa_run* -> docker_run* - Add sessions docker and docker_compiler - Docker: Run lint and tests in separate steps - Check building of wheel and bundle of app in all environments. - Fix test of documentation: There was a old call of make with the message "make: Nothing to be done for 'doc'." because the makefile was removed with #516.
As suggested in #514 this PR replaces the makefile to run the quality test with nox.
Nox is configured with a
noxfile.py
where the tests are described. The needed modules for the test are installed in a test specific virtual environment. Because of this the requirement.txt files are removed, the user only need to install nox.Also the mechanism if only a gcc instead of gcc-x is available (e.g. for GitHub actions running on Windows) is changed. Instead of copying the executable an additional environment variable
CC_REFERENCE
is introduced which is used intest_gcovr.py
if it is defined.The building of the wheel is also moved from the pipeline to the
noxfile.py
and the pipeline now uses nox for runningsetup.py
.The
noxfile.py
also contains a list of black conform files. This files are checked with different options to abort if there are formatting errors. If a file is formated with black it should be added to the list. After all files are black conform the call should be changed.