Testing your labs
Test your code
- Make sure you’ve saved all your changes (Ctrl+S)
- Make sure you’ve committed your changes to your local repository.
- Check that your code passes any tests embedded in each notebook as you go.
- To test a single exercise, you can use a terminal window, change into your repo directory, and run either:
julia --project=test test/test1.jl
- To test al the exercises, you can run
julia --project=test test/runtests.jl
Once you’ve pushed your changes, it’s also good to double check that your lab passes the same test via the continuous integration testing provided by GitHub actions.
If you get an error message about packages not being installed, then run
julia --project=test -e 'using Pkg; Pkg.instantiate(); '
to make sure all the packages specified in test/Project.toml are installed before running your tests.