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

Speed up tests #1908

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Speed up tests #1908

merged 1 commit into from
Oct 31, 2023

Conversation

hadley
Copy link
Member

@hadley hadley commented Oct 31, 2023

  • Enable parallel testing. For me, this dropped runn time down from 30s to 11s, 10s of which is the release tests.
  • Refactor release tests to avoid expensive CRAN downloads. This has equivalent test coverage but reduces test time from 10s to 4s, bringing total test time down to around 8 seconds.
  • Start the slowest tests (github-actions and release) first. This brings total test time down to around 6s

* Enable parallel testing. For me, this dropped runn time down from 30s to 11s, 10s of which is the release tests.
* Refactor release tests to avoid expensive CRAN downloads. This has equivalent test coverage but reduces test time from 10s to 4s, bringing total test time down to around 8 seconds.
* Start the slowest tests (github-actions and release) first. This brings total test time down to around 6s
@hadley hadley requested a review from jennybc October 31, 2023 12:40
Copy link
Member

@jennybc jennybc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new form of testing the problem from #1857 is pretty different, but if you're happy that it still gets the job done, then I'm happy!

utils::available.packages(repos = default_cran_mirror()),
available.packages(repos = default_cran_mirror()),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just mildly curious. Does this make a difference?

Updated: oh I see you want to mock it.

@hadley hadley merged commit 3a5e2ba into main Oct 31, 2023
13 checks passed
@hadley
Copy link
Member Author

hadley commented Oct 31, 2023

Abstractly I think the turns the tests around 90°; they still cover the same stuff but in a rather different way.

@hadley hadley deleted the parallel-testing branch October 31, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants