-
Notifications
You must be signed in to change notification settings - Fork 200
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
CI: move pytest
configuration to pyproject.toml
#5281
CI: move pytest
configuration to pyproject.toml
#5281
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #5281 +/- ##
===========================================
+ Coverage 82.01% 82.01% +0.01%
===========================================
Files 533 533
Lines 38243 38243
===========================================
+ Hits 31361 31362 +1
+ Misses 6882 6881 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
pyproject.toml
Outdated
@@ -57,7 +57,7 @@ max-locals = 20 | |||
|
|||
[tool.pytest.ini_options] | |||
minversion = "6.0" | |||
addopts = "--benchmark-skip" | |||
addopts = "--benchmark-skip --durations=50 --cov aiida --cov-report xml --cov-append --verbose" |
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.
The only problem is that it forces every run of pytest to be verbose now and output all the coverage, i.e. when I'm testing locally.
At least for verbose
, I would rather have this set in the workflow job
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.
Ah yeah, that's true. Maybe I move --cov aiida
and --verbose
to the actual invocation in tests.sh
.
313ebec
to
ee7d060
Compare
Part of the `pytest` configuration was done through environment variables in the `.github/workflows/tests.sh`. This is moved to the `pyproject.toml` where the rest of the configuration is and as such everything is one place. The `.coveragerc` configuration file no longer seems necessary since the configuration is specified directly.
These options are only desirable for the test script run on the CI and not if we run locally directly invoking `pytest`.
ee7d060
to
3069ce1
Compare
@chrisjsewell want to have a final look at this one? |
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.
Yeh should be fine cheers
Part of the
pytest
configuration was done through environmentvariables in the
.github/workflows/tests.sh
. This is moved to thepyproject.toml
where the rest of the configuration is and as sucheverything is one place.
The
.coveragerc
configuration file no longer seems necessary since theconfiguration is specified directly.