question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make test suite more efficient to run in 10 minutes

See original GitHub issue

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 😄

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
willschlitzercommented, Feb 12, 2021

It works! Thanks @weiji14!

0reactions
weiji14commented, Feb 12, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

9 Ways To Make Slow Tests Faster - Semaphore CI
At Semaphore, we've seen our fair share of tests and have identified 9 ways to make your slow tests faster.
Read more >
TDD test suites should run in 10 seconds or less - ploeh blog
Thus, a unit test suite used for TDD should run in less than 10 seconds. If it's slower, you'll be less productive because...
Read more >
Tips to improve speed of your test suite | by Appaloosa Store
Our Rspec and Test-Unit suites take up to 10 minutes each, so a full test suite runs in around 20 minutes. That's a...
Read more >
Make Your Jest Tests up to 20% Faster by Changing a Single ...
When you have Jest as your test runner, passing the --maxWorkers=50% option will make the tests faster in most cases.
Read more >
How slow is too slow for unit tests? - Stack Overflow
I'd say if you start talking minutes than it's too slow and you should probably break up the test suite into individual test...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found