-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
tests: split github workflow into multiple jobs #10988
Conversation
- run: yarn diff:sample-json | ||
- run: yarn type-check | ||
- run: yarn lint | ||
- run: yarn test-proto # Run before unit-core because the roundtrip json is needed for proto tests. | ||
|
||
# Run tests that require headfull Chrome. | ||
- run: sudo apt-get install xvfb |
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.
build
stops being a great name for this job past this point. All the xvfb stuff could be moved to a new job. a couple of them require dist
so it'd need to be dependent on build
and download the artifact.
smoke
will take so much longer than this job so it'd ndb, I prefer to keep it like this and not split the job.
require('../../../../dist/lighthouse-dt-bundle.js'); | ||
// Add empty string to circumvent TS, otherwise a clean `dist/` folder | ||
// would result in `yarn type-check` failing. | ||
require('../../../../dist/lighthouse-dt-bundle.js' + ''); |
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.
:)
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.
Running into Amdahl's law :)
I'm nervous splitting up the build
and misc
steps. I don't see obvious problems, but as the number of, uh, custom tests has grown, there are also a bunch of implicit dependencies (e.g. tests passing from a straight checkout but failing once yarn update:sample-json
is run). yarn smoke
is the limiting reagent, so we could split things up differently and still save a bunch of time (and work on untangling some of the tests a bit in the meantime).
looks great! i would also like to bikeshed how to parallelize this. :) how about
@brendankenny dunno what you mean about the implicit dependencies... i'm not seeing a problem so far... |
⬇️
would expose several of them, for instance :) |
regardless of any more juggling, it isn't going to go any faster than the smoke tests unless they're broken up. There's also some weird low hanging fruit, like why is uploading to buildtracker so slow? |
looked into it a bit ago. it's primarily the cost of running brotli against all our bundles |
ah just built file dependencies! okay great. #10994 has what i was thinkin there. |
Merged the additional ToT smoke test and made a separate job for it. https://github.com/GoogleChrome/lighthouse/actions/runs/140296254 logged 12m for everything |
Splits into four jobs (with no dependencies):
Currently takes ~19 minutes to run our workflow. Now it takes ~10 minutes.
Also uploading
dist/
as a build artifact. Even though currently there are no dependent jobs requiring the usage of artifacts, makingdist/
downloadable may prove useful.