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

tests: parallelize all the tests #11009

Merged
merged 32 commits into from
Jun 25, 2020
Merged

tests: parallelize all the tests #11009

merged 32 commits into from
Jun 25, 2020

Conversation

paulirish
Copy link
Member

@paulirish paulirish commented Jun 24, 2020

This PR merges both @connorjclark's #10988 and @brendankenny's #10993. And then I tweaked the work balance of the non-smoke stuff.

smoke stuff

  • ToTChrome is added to the mix
  • brendan's approach of halving the smoketests has big impact in total duration.

3 major non-smoke jobs: basics + unit

  • I looked at the timings a bit. There's benefit to splitting apart all the non-smoke stuff, otherwise it'll finish after the halved smokes do. I don't see any material benefits when split into 3 pieces, so as long as we kick out the longest smoke step into its own job, we're good. Ideally these two non-smoke jobs have equal durations.
  • Contrasting with connor's, i essentially merge misc back into build
  • Contrasting with brendan's, I build-all in both basics and unit.

The last two runs of this branch finished in 6:16 and 6:08, which is 2 and 6 min faster than the other two PRs.

@paulirish paulirish requested a review from a team as a code owner June 24, 2020 00:55
@paulirish paulirish requested review from Beytoven and removed request for a team June 24, 2020 00:55
@googlebot

This comment has been minimized.

- run: yarn type-check
- run: yarn lint
- run: yarn test-lantern
- run: yarn test-legacy-javascript
Copy link
Collaborator

Choose a reason for hiding this comment

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

lantern can take 1m

legacy js can take 3m

idk about lhci dogfood.

so if we want to keep it under 10 minutes always we should move these to their own job.

connorjclark
connorjclark previously approved these changes Jun 24, 2020
Copy link
Collaborator

@connorjclark connorjclark left a comment

Choose a reason for hiding this comment

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

i can dig it

@@ -123,18 +123,19 @@ jobs:
with:
node-version: 10.x

- name: Define ToT chrome path
if: matrix.chrome-channel == 'ToT'
run: echo "::set-env name=CHROME_PATH::/home/runner/chrome-linux-tot/chrome"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think set-env only applies to the next step.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah the wording is stupid https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable

Creates or updates an environment variable for any actions running next in a job.

"Next", you say...

… The action that creates or updates the environment variable does not have access to the new value, but all subsequent actions in a job will have access.

so yeah. it's all subsequent.

also i hate how this doc says "actions" but should say "steps".


tested it earlier: https://github.com/GoogleChrome/lighthouse/runs/805258701?check_suite_focus=true

I read it two steps after i set it.

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah good catch.

cc @github lol

fail-fast: false
env:
# The smokehouse tests run by job `smoke_0`. `smoke_1` will run the rest.
SMOKE_GROUP_1: a11y oopif pwa pwa2 pwa3 dbw redirects errors offline
Copy link
Member

Choose a reason for hiding this comment

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

for future reference this can be split up further with one smoke test running $SMOKE_GROUP_1, one running $SMOKE_GROUP_2 and a third running --invert-match $SMOKE_GROUP_1 $SMOKE_GROUP_2 (and so on with further divisions) but will need to make the matrix dynamically

env:
# The smokehouse tests run by job `smoke_0`. `smoke_1` will run the rest.
SMOKE_GROUP_1: a11y oopif pwa pwa2 pwa3 dbw redirects errors offline
name: smoke_${{ strategy.job-index }}_${{ matrix.chrome-channel }}
Copy link
Member

Choose a reason for hiding this comment

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

these are ugly. Where's the craftsmanship? :P

Copy link
Member Author

Choose a reason for hiding this comment

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

what were you thinking?

btw really glad you found this name prop tho.. since we need these to be deterministically named for branch protection.


# A few steps are duplicated across all jobs. Can be done better when this feature lands:
# https://github.community/t/reusing-sharing-inheriting-steps-between-jobs-declarations/16851
# https://github.com/actions/runner/issues/438
steps:
- name: git clone
uses: actions/checkout@v2
Copy link
Member

Choose a reason for hiding this comment

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

faster to with: fetch-depth: 100 at this point instead of splitting it with the fetch below?

Copy link
Member Author

Choose a reason for hiding this comment

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

thx. i'll give that a shot.

@brendankenny
Copy link
Member

@googlebot I consent.

@brendankenny
Copy link
Member

make sure to wait for #11025

@paulirish paulirish merged commit c139d72 into master Jun 25, 2020
@paulirish paulirish deleted the uberjobs branch June 25, 2020 21:37
gMakunde pushed a commit to gMakunde/lighthouse that referenced this pull request Jul 6, 2020
Co-authored-by: connorjclark and brendankenny
gMakunde pushed a commit to gMakunde/lighthouse that referenced this pull request Aug 28, 2020
Co-authored-by: connorjclark and brendankenny
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.

6 participants