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

Run tests in Parallel where possible #499

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

toqueteos
Copy link

@toqueteos toqueteos commented Aug 1, 2024

There was no issue addressing this.

Changes proposed in this pull request:

  • Make most of the tests run in parallel as they are totally independent from one another. Untouched tests (depend on os):
    • oslib_test.go (filesystem)
    • baselib_test.go (use os.Getenv)
    • script_test.go (use os.Chdir)

This change is very noticeable in CI specially when -race is enabled and/or running in GitHub Actions (tests can easily take 30+ seconds to run).

Here's some timing information (my local machine):

  • Old: 7.674s (avg 12 runs)
  • New: 2.669s (avg 12 runs)

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.

1 participant