-
Notifications
You must be signed in to change notification settings - Fork 16
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
refactor: ci/test improvements #1238
Conversation
Yeah, it's bigger than I thought it would be, it was a lot of trial and error and things are sort-of intertwined. Now that I have it buttoned up and know what works I could probably split it over multiple successive PR's, but that'll take time to do, so I opted to PR it as-is and move on to things in the backlog. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, 🙏🏽. I need to give some of these changes another look, but this largely looks good. I mainly just have a bunch of questions.
Added |
Added commit hashes for all actions in lieu of #1249 being PR'd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. But I had only two things, one about building all targets and another about the retries, which I don't think get used in CI.
I did not take a close look at the Makefile changes for the emily client or the blocklist client so some extra eyes there would be nice.
Description
Our build/CI times were starting to annoy me, so I took a stab at refactoring this a bit. Got a bit bigger than I thought it would, but this is the result of a fair bit of trial-and-error -- at least it deletes more than it adds 😄
A lot of the changed files are just moved or deleted files, or removing the
#[cfg_attr(not(feature = "integration-tests"), ignore)]
attribute.This PR brings CI times down from ~10 minutes to ~4 minutes. This could probably be further reduced to closer to ~3m with #1223 (which reduces runtime of integration tests from ~ 3m to ~1m).
Changes
Workspace
Makefile
a fair bit; all of the targets should work as expected now (unless I missed to test something)Makefile
now handles the 3x emily API clients (private, public, testing).integration-tests
feature:--lib
cargo/nextest flag, and integration tests with the--test integration
argument.Makefile
targets have been updated to reflect this.nextest
now.Cargo.toml
.blocklist-client
and emily integration tests due to theconfig
crate version/API differences.1.81
so thatmake emily-as-lambda
works.event_loop.rs
due to newclippy
lint.make build
or the respective specialized codegen targets will still do this if needed, though..generated-sources
and into the main workspace. Now only actually generated code lives there.openapi-generator-cli
less noisy (error logs only).clean
commands for generators since we don't want to delete the generated sources anymore (checked in).CI
on-push.yaml
workflow.on-push
).ubuntu-24.04
.nextest
archives to separate the building of test artifacts from the running of them. Now we run unit and integration jobs concurrently.mold
linker -- generally faster thanld
.emily-aws-setup
container in CI and run theinitialize.py
directly. The container build took unnecessary time.nextest
partitioning to split-up the integration tests over parallel jobs.lints
job.read
([Feature]: Ensure GitHub workflows have only read permissions (unless needed) #1234).Unit & integration tests now run with--retries 2
, so if there are any flaky tests the run will have a chance at succeeding (note that flaky tests are reported in the logs).Well I think that's the gist of it... Probably forgot something 😅
Checklist: