Skip to content
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 integration tests to docker image #53

Open
agjohnson opened this issue Dec 28, 2017 · 3 comments
Open

Add integration tests to docker image #53

agjohnson opened this issue Dec 28, 2017 · 3 comments
Labels
Needed: design decision A core team decision is required Needed: tests Tests are required

Comments

@agjohnson
Copy link
Contributor

This would still be a manual process, as I don't know how we would automate the integration tests, but it would at least give maintainers and contributors a quick way of testing changes to the build image.

Tests would include:

  • Test cloning repository
  • Test sphinx html build and that output looks correct
  • Test sphinx pdf build and that output looks correct
  • Test sphinx epub build and that output looks correct
  • Test conda installation
  • Test pip installation
  • Test virtualenv?

Any more here?

Refs #48

@humitos
Copy link
Member

humitos commented Dec 29, 2017

I think this could be complicated (time consuming at the beginning) but what about having a repository with one branch per scenario (under https://github.com/readthedocs/template for example), including a readthedocs.yaml with Py3 another with Py2, another with python setup.py install another without it and more...

So, then in this repository a tox file that runs all of those scenarios. Finally, the contributor can take a quick look to a couple of index.html and pdf to check that the overall is working and check more granulary the change that he/she just incorporate?

@agjohnson
Copy link
Contributor Author

Perhaps, though I'd avoid manual review as a requirement. I suppose we can move the output files to a docker shared volume for review afterwards though.

testinfra could be a useful addition here, and has a connector for docker:
https://testinfra.readthedocs.io/en/latest/examples.html#test-docker-images

I'd say we could just include fixtures here and automate testing of the output, no need for a separate repo.

@humitos
Copy link
Member

humitos commented Oct 15, 2020

I think this could be complicated (time consuming at the beginning) but what about having a repository with one branch per scenario (under readthedocs/template for example), including a readthedocs.yaml with Py3 another with Py2, another with python setup.py install another without it and more...

This is already done in the https://github.com/readthedocs/test-builds repository and we can use here to make some simple builds on the just created docker images. We can just check the exit code is 0 in all the commands for now.

  • Test conda installation
  • Test pip installation
  • Test virtualenv?

There are already done in #143. We can easily add the rest one once that PR gets merged and we are happy with the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required Needed: tests Tests are required
Projects
None yet
Development

No branches or pull requests

2 participants