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

ci(jest): split jest tests to run in multiple shards #3912

Merged
merged 7 commits into from
Jul 26, 2023

Conversation

HeartSquared
Copy link
Contributor

@HeartSquared HeartSquared commented Jul 26, 2023

Why

KDS-1641

We write a lot more tests nowadays (which is great!), so it takes much longer to run them in CI, leading to potential timeouts (we currently set GH Actions to time out at 10 minutes).

Eg. https://github.com/cultureamp/kaizen-design-system/actions/runs/5663799519

Using shards(https://jestjs.io/docs/cli#--shard ) we can run multiple GH jobs in parallel, which should save time.

What

  • Split jest tests to be run separately in 2 shards + aio

@changeset-bot
Copy link

changeset-bot bot commented Jul 26, 2023

🦋 Changeset detected

Latest commit: 9381e58

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jul 26, 2023

✨ Here is your branch preview! ✨

Last updated for commit 9381e58: ci: update jest jobs to share names per react version

@HeartSquared HeartSquared marked this pull request as ready for review July 26, 2023 04:16
@HeartSquared HeartSquared requested a review from a team as a code owner July 26, 2023 04:16
@gyfchong
Copy link
Contributor

Is it possible to hide these shards? It's getting a bit crowded in the checks window

@HeartSquared
Copy link
Contributor Author

Is it possible to hide these shards? It's getting a bit crowded in the checks window

No idea. I haven't found any docs about it, but I can try random things and see if it works 🤷🏻‍♀️

@gyfchong
Copy link
Contributor

I suppose it's only cluttered for now, we're approaching KAIO, so it'll slim significantly

@HeartSquared HeartSquared merged commit 115fc56 into main Jul 26, 2023
24 checks passed
@HeartSquared HeartSquared deleted the KDS-1641/jest--run-ci-with-shards branch July 26, 2023 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants