-
-
Notifications
You must be signed in to change notification settings - Fork 117
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] Configured travis builds #15 #18
Conversation
3d31463
to
81a417e
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.
Thanks for picking it up fast.
See my comments.
I enabled travis and coveralls.
requirements-test.txt
Outdated
@@ -1,3 +1,4 @@ | |||
coveralls |
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.
not needed, openwisp-utils brings this dependency in: https://github.com/openwisp/openwisp-utils/blob/master/requirements-test.txt#L1
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.
But that's in requirements-test.txt
😅
.travis.yml
Outdated
- | | ||
openwisp-utils-qa-checks \ | ||
--migration-path ./openwisp_monitoring/monitoring \ | ||
--migration-module monitoring |
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.
--migration-module monitoring monitoring device check
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 have update accordingly, took reference from openwisp-controller
.travis.yml
Outdated
- pip install --no-cache-dir -U -r requirements-test.txt | ||
- ./runflake8 | ||
- ./runisort | ||
- pip install --no-cache-dir -U -r requirements.txt -r requirements-test.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.
install only requirements-test.txt
, don't worry if it fails, I will help you debug it.
56bfe34
to
ec88e25
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.
@TheOneAboveAllTitan I had a few suggestions.
- The migration check is failing due to a bad PR of mine. I will take care of it sorry to cause any unnecessary trouble.
- Consider using
It will take care of the dependencies like pyasn1 and cryptography (though doesn't take care of coveralls somehow)
pip install -e .
- Also as a general practice I have observed that the build is tested across multiple Django versions, please consider it.
I have tried out the changes and the build is passing for me.
Hope it helps 😄
@nepython coveralls is pulled from I realized my assumption was wrong. But I thought that was the case so I'm sending a PR to fix that. |
.travis.yml
Outdated
- pip install -U pip wheel setuptools | ||
- docker run -d --name influxdb -p 8086:8086 influxdb | ||
- docker exec -it influxdb influx -execute 'CREATE DATABASE openwisp2' | ||
- pip install -U pip wheel setuptools pyasn1 | ||
- pip install --no-cache-dir -U -r requirements-test.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.
let's remove --no-cache-dir
for consistency with other modules. If you find this in other modules let me know so we can remove it. I added it at some point in the past in which I was going crazy with the travis cache. Then they added a way to clear the cache from the web app.
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 took reference from openwisp-firmware-upgrader
and it is still present there. Should I create a PR for that?
.travis.yml
Outdated
- pip install --no-cache-dir -U -r requirements-test.txt | ||
- ./runflake8 | ||
- ./runisort | ||
|
||
install: | ||
- python setup.py -q develop |
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.
let's use pip install -e .
./openwisp_monitoring/device/migrations \ | ||
./openwisp_monitoring/monitoring/migrations \ | ||
./openwisp_monitoring/notifications/migrations" \ | ||
--migration-module "check device_monitoring monitoring notifications" | ||
- coverage run --source=openwisp_monitoring runtests.py |
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 understood why this is failing, can you add pip install https://github.com/openwisp/openwisp-utils/tarball/master
temporarily in before_install
please?
requirements.txt
Outdated
@@ -5,3 +5,4 @@ django-apptemplates>=1.4,<2.0 | |||
django-celery-email>=3.0.0,<3.1 | |||
djangorestframework>=3.11,<3.12 | |||
swapper | |||
cryptography<2.9.0,>=2.4.0 |
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.
not sure why this is needed, it should be already specified somewhere upstream. Can you try commenting it out and let the build run without it please?
@TheOneAboveAllTitan , I think Update: They might now be required, just read openwisp/openwisp-docs#100 though it is about introducing a new script unsure if these can be removed safely. |
Thank you @nepython for your suggestions. I have applied these suggestions. The build is passing now. |
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.
yess 👍
Closes #15
pip
was erroring out due to incompatible requirements forcryptography
module, so had to mention it inrequirements.txt
. See for more infoKindly suggest any other way to mitigate this problem.
@nemesisdesign please turn on Travis and Coveralls for this repository.