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

Make sz test more performant. #340

Merged
merged 20 commits into from
Jan 27, 2023
Merged

Conversation

Jonas-Sander
Copy link
Collaborator

@Jonas-Sander Jonas-Sander commented Jan 24, 2023

Tests are now run concurrently for the different packages, instead of only one at a time.

Time to run tests in GitHub CI:
Old time: 18min 36s
New time: 8-11 min

@github-actions github-actions bot added the dependencies Changing, updating, adding or removing one or more dependencies. label Jan 24, 2023
@github-actions
Copy link

github-actions bot commented Jan 24, 2023

Visit the preview URL for this PR (updated for commit ea6926a):

https://sharezone-test--pr340-test-command-better-qwtvn7zk.web.app

(expires Fri, 03 Feb 2023 18:02:03 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4cb3ae61e1e018abfd9841fd3239f5b49ccc034b

@Jonas-Sander
Copy link
Collaborator Author

First test run (only sz test time, not whole action):

  • Concurrency 1: (Still running...)
  • Concurrency 3: 7m 13s
  • Concurrency 5: 6m 43s
  • Concurrency 7: [FAILED] 10m 6s (sharezone app package took longer than 10min --> timeout failure)

@Jonas-Sander
Copy link
Collaborator Author

Second test run (only sz test time, not whole action):

  • Concurrency 3: 8m 19s
  • Concurrency 4: [FAILED] 10m 5s (sharezone app package took longer than 10min --> timeout failure)
  • Concurrency 5: 9m 34s
  • Concurrency 6: 7m 1s

@Jonas-Sander
Copy link
Collaborator Author

Third test run (only sz test time, not whole action):
The sharezone package was now tested at the end instead of the beginning.

  • Concurrency 3: 9m 5s
  • Concurrency 4: 7m 56s
  • Concurrency 5: 8m 1s
  • Concurrency 6: 11m 58s

@github-actions github-actions bot removed the ci/cd label Jan 26, 2023
Jonas-Sander added a commit that referenced this pull request Jan 27, 2023
I refactored the code for the `sz analyze` command so that the logic for
concurrently running a task for all packages can be used for the test
command as well (#340).
@github-actions github-actions bot removed the dependencies Changing, updating, adding or removing one or more dependencies. label Jan 27, 2023
@Jonas-Sander Jonas-Sander marked this pull request as ready for review January 27, 2023 17:41
Copy link
Member

@nilsreichardt nilsreichardt left a comment

Choose a reason for hiding this comment

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

LGTM

tools/sz_repo_cli/lib/src/commands/src/test_command.dart Outdated Show resolved Hide resolved
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
}
}

Nit: Add newline at end of file.

Isn't VS Code adding a newline at the of file when you are pressing auto-format?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No locally it adds a new line at the end when I save and the file is auto-formatted.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For me locally there is a new line at the end - maybe it has something to do with git?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added a new line via GitHub but now there are two for me locally 🤔

@github-actions github-actions bot removed the testing label Jan 27, 2023
@Jonas-Sander Jonas-Sander merged commit 256a5e5 into main Jan 27, 2023
@Jonas-Sander Jonas-Sander deleted the test-command-better-performance branch January 27, 2023 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants