Closed yuvipanda closed 2 years ago
https://github.com/2i2c-org/utexas-image/pull/3 is what I was testing with.
This looks cool! Could we run a test in this repo too, since there's a notebook in https://github.com/jupyterhub/repo2docker-action/tree/master/notebooks ?
This is super cool and innovative!!!LGTM
Thank you for the kind words and suggestions, @hamelsmu and @choldgraf! I've accepted those :)
@manics is this repo already built with the same action? I'm actually not sure at all what the notebook here is used for or how I'd do what you're suggesting.
Does this action support the ability to look for a particular folder for the environment files to build an image from? If that were the case then we could have our own test/
folder with a little set of repo2docker files that we could use for basic testing.
@choldgraf i don't think it does. I do want to add that support though, but as a different PR.
I agree, if you're planning to add tests later anyway then merge this
@manics yeah, I'm actually working on moving some of this to python that will help us add more tests!
You can automatically test your built image to make sure package additions or removals do not break your code, allowing you to make changes with confidence. pytest is used to run the tests, and pytest-notebook is used to run any Jupyter Notebooks as tests.
image-tests/
in your GitHub repository..py
files you add inside this directory will be discovered and run withpytest
inside the built image after the image has successfully built..ipynb
) files inside this directory will be run withpytest-notebook
, and the notebook is considered to have failed if the outputs of the code execution do not match the outputs already in the notebook. A nice diff of the outputs is shown if they differ. See the pytest-notebook docs for more information.requirements.txt
file inside theimage-tests/
directory can list additional libraries installed just for the test.See https://github.com/2i2c-org/utexas-image/runs/5431256062?check_suite_focus=true for an example of a notebook test that fails.