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

CircleCI - Update configuration to make builds once and share between jobs #5462

Merged
merged 2 commits into from
Feb 15, 2023

Conversation

geriux
Copy link
Member

@geriux geriux commented Feb 9, 2023

Related PRs:

This PR updates the CircleCI configuration to add two new steps to create the builds separately so they can be shared between jobs. The reasoning for this apart from optimizing the time it takes to run and credits usage, it's that we were reaching the limit amount to upload artifacts in the 15 mins timeframe, which is limited to 5.

There's no need to upload the build for each platform in each job (Canaries, Full tests) so now it will just do it once per platform.

It also adds requires steps for some jobs, now that the builds are done separately we can't run tests until those are uploaded.

This is also a pre-work for the visual regression tests where we will be introducing a new job for them so they run in parallel as the other E2E tests to save up running time.

Besides that, it also adds npm-install-without-scripts which will install the packages without the postinstall scripts to save quite a bit of time since we will only need some packages to run the tests like appium, etc.

The key names for the NPM cache jobs are also updated to just use the arch value since we use two different images, we don't need to store this per job name.

Finally, it updates the nvm command to use the latest version v0.39.3.

Our current workflow in trunk is:

Screen Shot 2023-02-13 at 15 12 34

This is how the test will run with this PR:

Screen Shot 2023-02-13 at 15 11 07

To test CI checks should pass.

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered if this change warrants user-facing release notes more info and have added them to RELEASE-NOTES.txt if necessary.

@geriux geriux added the Testing Anything related to automated tests label Feb 9, 2023
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Feb 9, 2023

Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job!

@geriux geriux changed the title Try requiring check correctness first CircleCI - Update configuration to make builds once and share between jobs Feb 9, 2023
@geriux geriux marked this pull request as ready for review February 13, 2023 14:15
@@ -137,7 +160,7 @@ parameters:
linux-machine-image:
type: string
# Latest supported ubuntu image from https://circleci.com/docs/2.0/configuration-reference/#available-machine-images
default: "ubuntu-2004:202010-01"
default: "ubuntu-2004:2022.10.1"
Copy link
Member Author

Choose a reason for hiding this comment

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

I saw we were using a pretty old image so I updated it to the last one. I haven't seen any issues with the update.

Copy link
Contributor

@fluiddot fluiddot left a comment

Choose a reason for hiding this comment

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

LGTM 🎊 ! I checked the new duration of E2E tests and this is a huge improvement, amazing work @geriux 🏅 !

As shared in WordPress/gutenberg#48026 (review), I checked the E2E tests and all succeeded. I added some minor comments/suggestions but shouldn't block the merge of this PR.

.circleci/config.yml Outdated Show resolved Hide resolved
.circleci/config.yml Outdated Show resolved Hide resolved
@geriux
Copy link
Member Author

geriux commented Feb 14, 2023

FYI I've updated nvm in 7b6d127

- Updating the naming structure we use for the cache keys
- Add new jobs to make app builds before running E2E tests
- Adds the requires param for a few jobs that will depend on test checks and builds steps to succeed before running
- A new npm install comand that will not run postinstall scripts to speed up running time
- Updates NVM
- Updates the linux image version
@geriux geriux merged commit 3a3f91a into trunk Feb 15, 2023
@geriux geriux deleted the improve-order-of-ci-jobs branch February 15, 2023 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing Anything related to automated tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants