-
Notifications
You must be signed in to change notification settings - Fork 56
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
dev: improve python-run-tests execution #756
dev: improve python-run-tests execution #756
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #756 +/- ##
==========================================
+ Coverage 18.94% 18.99% +0.04%
==========================================
Files 26 26
Lines 2285 2290 +5
==========================================
+ Hits 433 435 +2
- Misses 1852 1855 +3
|
184b552
to
5ff9253
Compare
How to test: $ cd ~/src/reana
$ workon reana
$ reana-dev git-checkout-pr --fetch \
-b reana 756 \
-b reana-db 208 \
-b reana-demo-cms-reco 30 \
-b reana-job-controller 411 \
-b reana-server 639 \
-b reana-workflow-controller 537 \
-b reana-workflow-engine-serial 188
$ pip install . --upgrade
$ PYTEST_ADDOPTS=tests/test_version.py reana-dev python-unit-tests -c ALL -k |
28b4870
to
6ff27f4
Compare
run-tests.sh
Outdated
if [ -n "${PYTESTARG-}" ]; then | ||
pytest "$PYTESTARG" | ||
else | ||
python setup.py test | ||
fi |
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 that the changes to this file should not be needed
CHANGES.rst
Outdated
-------------------------- | ||
|
||
- Developers: | ||
- Changes `python-run-tests` command to allow execution of selected pytests only by passing over `PYTESTARG` environment variable. |
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.
- Changes `python-run-tests` command to allow execution of selected pytests only by passing over `PYTESTARG` environment variable. | |
- Changes `python-run-tests` command to allow execution of selected pytests only by passing over `PYTEST_ADDOPTS` environment variable. |
6ff27f4
to
a64bbea
Compare
Improves the `python-run-tests` command to create Python-3.8 based virtual environments to use the same version as container images. Updates `pip` before installing each component in order to speed up the dependency resolution for certain cluster components. Allows execution of selected pytests only by passing over `PYTEST_ADDOPTS` environment variable. Switches to using `run-tests.sh` to execute pytests in individual components which takes care of the DB setup at the source. Allows excluding certain Python components such as `-c CLUSTER --exclude-components r-j-controller` on macOS. Example: ``` $ PYTEST_ADDOPTS=tests/test_version.py reana-dev python-unit-tests -c ALL -k ``` Closes reanahub#755.
a64bbea
to
5a06eef
Compare
Improves the
python-run-tests
command to create Python-3.8 based virtual environments to use the same version as container images.Updates
pip
before installing each component in order to speed up the dependency resolution for certain cluster components.Allows execution of selected pytests only by passing over
PYTEST_ADDOPTS
environment variable.Switches to using
run-tests.sh
to execute pytests in individual components which takes care of the DB setup at the source.Allows excluding certain Python components such as
-c CLUSTER --exclude-components r-j-controller
on macOS.Example:
Closes #755.