Description of the desired feature
PyGMT's test suite is growing, and in the long-term, we'll need to make testing a bit more efficient for contributors. As a goal, we should aim for ~10 minutes for the whole test suite (Windows takes up ~30min 15min now (see #586)), and <1 minute for local tests on just one module.
Here's a few ways we can tackle this (note to maintainers, feel free to edit this top post):
Local tests
Running make test can be slow since it runs everything, but sometimes we only want to test one function (e.g. grdimage).
Github Actions tests
Installing dependencies
The bulk of the CI time is spent installing dependencies from conda (4min on Linux, 9min on Windows). We could:
Speed up full test suite
Find a way to run a minimal set of tests when Pull Request is in draft, and only full test suite when Pull Request is ready to review/in review?
Are you willing to help implement and maintain this feature? Let's do it together 😄
Description of the desired feature
PyGMT's test suite is growing, and in the long-term, we'll need to make testing a bit more efficient for contributors. As a goal, we should aim for ~10 minutes for the whole test suite (Windows takes up
~30min15min now (see #586)), and <1 minute for local tests on just one module.Here's a few ways we can tackle this (note to maintainers, feel free to edit this top post):
Local tests
Running
make testcan be slow since it runs everything, but sometimes we only want to test one function (e.g.grdimage).pytest -v --mpl pygmt/tests/test_grdimage.py.pytest-fastestto automate testing only the code that has changed between the current branch and master.Github Actions tests
Installing dependencies
The bulk of the CI time is spent installing dependencies from conda (4min on Linux, 9min on Windows). We could:
mambawhich is a fast reimplementation ofcondawritten in C++. I've tried it before, but it's still in experimental mode at setup-miniconda, see https://github.com/conda-incubator/setup-miniconda#example-6-mamba (Use mamba to install Continuous Integration dependencies #841)Speed up full test suite
Find a way to run a minimal set of tests when Pull Request is in draft, and only full test suite when Pull Request is ready to review/in review?
Are you willing to help implement and maintain this feature? Let's do it together 😄