-
Notifications
You must be signed in to change notification settings - Fork 40
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
Create and document a more systematic automated testing procedure #483
Comments
I have created a FROM oduwsdl/ipwb
RUN pip install pycodestyle codecov pytest-cov
COPY test-requirements.txt ./
RUN pip install -r test-requirements.txt
CMD pycodestyle && ipfs daemon & while ! curl -s localhost:5001 > /dev/null; do sleep 1; done && py.test --cov=./ |
Looking at the requirements.txt file, I am wondering why does it contain
Looking at the test-requirements.txt, I am wondering why does it not contain some dependencies such as
|
I have made some changes as per #484 to perform tests during the image building process. Now testing can be performed using the following command locally:
The first time it might take a while to to install dependencies, but successive builds will be fast and they will quickly reach to the testing stage. |
@ibnesayeed In addition to these variable, inconsistent requirements files, there is also a set of requirements defined in |
Current master branch fails
I have synchronized dependencies in the setup.py file with those in the two requirements files, but the above described situation persists, which is no worse than the current state. |
Pipfile is a potential improvement as per #366. |
By the way, if you want to test installation experiences using different commands on a clean slate, you can use Docker like this (assuming you are in directory where ipwb code lives):
Then you can exit from the container and repeat the process for the next installation method. |
Related question, @ibnesayeed: should we have Travis also be running tests for our ipwb Docker configuration? There exists the potential for a discrepancy if we are not diligent about keeping the Docker and native Python versions consistent. |
Docker builds will fail if the tests fail there, so no need to retest that separately. You can enable email notification for build failures on DockerHub. |
While writing tests in 1bf14a3, I could not wield my local Python, Pip, IPFS, and IPWB into a consistent environment to obtain the same results as TravisCI reported in PRs.
With @ibnesayeed's help, I was able to get replicable testing using our current Docker build and configuration but the commands needed to perform this operation along with setting up the environment (e.g., installing requirements per the .travis.yml) are things I will forget.
@ibnesayeed mentioned a Dockerfile could also be created for testing. Let's do and document this to replicate the TravisCI & pytest tests and have a more consistent, replicable test-running environment independent of the CI system.
docker container run --rm -it -v "$PWD":/ipwb -p 5000:5000 oduwsdl/ipwb bash
Once in container:
The text was updated successfully, but these errors were encountered: