Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GoogleChrome/lighthouse
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v10.3.0
Choose a base ref
...
head repository: GoogleChrome/lighthouse
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v10.4.0
Choose a head ref

Commits on Jun 14, 2023

  1. Copy the full SHA
    4d9626a View commit details
  2. Copy the full SHA
    5b0ff4d View commit details

Commits on Jun 15, 2023

  1. Copy the full SHA
    dffeb67 View commit details
  2. Copy the full SHA
    373c9c6 View commit details
  3. Copy the full SHA
    0a32e6c View commit details
  4. Copy the full SHA
    be747ee View commit details

Commits on Jun 20, 2023

  1. Copy the full SHA
    f80eb48 View commit details

Commits on Jun 21, 2023

  1. Copy the full SHA
    53e0a59 View commit details

Commits on Jun 22, 2023

  1. Copy the full SHA
    7717fba View commit details

Commits on Jun 23, 2023

  1. Copy the full SHA
    6d9b11e View commit details

Commits on Jun 28, 2023

  1. Copy the full SHA
    d7e6f61 View commit details
  2. Copy the full SHA
    ac3b444 View commit details

Commits on Jun 29, 2023

  1. Copy the full SHA
    c0de78d View commit details
  2. Copy the full SHA
    540f55e View commit details

Commits on Jul 5, 2023

  1. Copy the full SHA
    9e2f70e View commit details
  2. Copy the full SHA
    ba1a763 View commit details
  3. Copy the full SHA
    3b0950c View commit details

Commits on Jul 6, 2023

  1. Copy the full SHA
    c23b356 View commit details
  2. Copy the full SHA
    cbcbfcc View commit details
  3. Copy the full SHA
    b7b0fa2 View commit details
  4. Copy the full SHA
    c0efe60 View commit details
  5. Copy the full SHA
    67c5c40 View commit details
  6. Copy the full SHA
    81244e7 View commit details
  7. Copy the full SHA
    a8470a1 View commit details

Commits on Jul 7, 2023

  1. Copy the full SHA
    85ced34 View commit details
  2. Copy the full SHA
    9fd24a3 View commit details
  3. Copy the full SHA
    477c876 View commit details
  4. Copy the full SHA
    7c5f223 View commit details
  5. Copy the full SHA
    c2ab38a View commit details

Commits on Jul 8, 2023

  1. Copy the full SHA
    e97934d View commit details

Commits on Jul 10, 2023

  1. Copy the full SHA
    4d3ee72 View commit details
  2. Copy the full SHA
    fbee662 View commit details
  3. Copy the full SHA
    73d077c View commit details
  4. i18n: import (#15243)

    adamraine authored Jul 10, 2023
    Copy the full SHA
    6b6afaa View commit details

Commits on Jul 11, 2023

  1. v10.4.0 (#15244)

    adamraine authored Jul 11, 2023
    Copy the full SHA
    c90b73a View commit details
Showing with 15,251 additions and 1,224 deletions.
  1. +3 −0 .github/workflows/ci.yml
  2. +2 −1 .github/workflows/devtools.yml
  3. +3 −0 .github/workflows/package-test.yml
  4. +8 −5 .github/workflows/smoke.yml
  5. +3 −0 .github/workflows/unit.yml
  6. +64 −0 changelog.md
  7. +45 −4 cli/test/fixtures/a11y/a11y_tester.html
  8. +19 −13 cli/test/smokehouse/frontends/smokehouse-bin.js
  9. +3 −5 cli/test/smokehouse/lighthouse-runners/bundle.js
  10. +165 −32 cli/test/smokehouse/test-definitions/a11y.js
  11. +8 −8 cli/test/smokehouse/test-definitions/issues-mixed-content.js
  12. +2 −2 cli/test/smokehouse/test-definitions/perf-preload.js
  13. +45 −0 core/audits/accessibility/aria-dialog-name.js
  14. +44 −0 core/audits/accessibility/aria-text.js
  15. +45 −0 core/audits/accessibility/empty-heading.js
  16. +45 −0 core/audits/accessibility/identical-links-same-purpose.js
  17. +44 −0 core/audits/accessibility/landmark-one-main.js
  18. +44 −0 core/audits/accessibility/link-in-text-block.js
  19. +44 −0 core/audits/accessibility/select-name.js
  20. +45 −0 core/audits/accessibility/target-size.js
  21. +12 −0 core/audits/audit.js
  22. +97 −25 core/audits/byte-efficiency/byte-efficiency-audit.js
  23. +146 −19 core/audits/long-tasks.js
  24. +7 −0 core/audits/non-composited-animations.js
  25. +2 −1 core/audits/prioritize-lcp-image.js
  26. +4 −0 core/audits/redirects.js
  27. +10 −0 core/audits/seo/link-text.js
  28. +3 −0 core/audits/unsized-images.js
  29. +11 −0 core/audits/viewport.js
  30. +13 −2 core/audits/work-during-interaction.js
  31. +1 −1 core/computed/js-bundles.js
  32. +48 −28 core/computed/metrics/tbt-utils.js
  33. +1 −1 core/computed/metrics/total-blocking-time.js
  34. +221 −0 core/computed/tbt-impact-tasks.js
  35. +17 −0 core/config/default-config.js
  36. +7 −7 core/config/filters.js
  37. +12 −0 core/config/validation.js
  38. +1 −3 core/gather/base-gatherer.js
  39. +8 −3 core/gather/gatherers/accessibility.js
  40. +0 −1 core/gather/gatherers/seo/font-size.js
  41. +3 −2 core/gather/gatherers/source-maps.js
  42. +2 −2 core/lib/cdt/SDK.js
  43. +3 −1 core/lib/dependency-graph/simulator/simulator.js
  44. +7 −1 core/lib/lh-error.js
  45. +1 −1 core/lib/navigation-error.js
  46. +1 −0 core/lib/network-recorder.js
  47. +4 −0 core/lib/stack-packs.js
  48. +125 −78 core/test/audits/byte-efficiency/byte-efficiency-audit-test.js
  49. +136 −2 core/test/audits/long-tasks-test.js
  50. +3 −0 core/test/audits/non-composited-animations-test.js
  51. +12 −0 core/test/audits/prioritize-lcp-image-test.js
  52. +10 −0 core/test/audits/redirects-test.js
  53. +44 −0 core/test/audits/unsized-images-test.js
  54. +3 −0 core/test/audits/viewport-test.js
  55. +5 −0 core/test/audits/work-during-interaction-test.js
  56. +308 −0 core/test/computed/tbt-impact-tasks-test.js
  57. +115 −3 core/test/config/config-helpers-test.js
  58. +22 −0 core/test/config/config-test.js
  59. +39 −0 core/test/config/filters-test.js
  60. +38 −0 core/test/config/validation-test.js
  61. +14 −0 core/test/create-test-trace.js
  62. +1,269 −317 core/test/fixtures/fraggle-rock/reports/sample-flow-result.json
  63. +1 −1 core/test/fixtures/valid-custom-gatherer.cjs
  64. +1 −1 core/test/fixtures/valid-custom-gatherer.js
  65. +28 −50 core/test/gather/driver/execution-context-test.js
  66. +8 −11 core/test/gather/driver/navigation-test.js
  67. +2 −19 core/test/gather/driver/wait-for-condition-test.js
  68. +14 −21 core/test/gather/fetcher-test.js
  69. +4 −1 core/test/gather/gatherers/accessibility-test.js
  70. +5 −10 core/test/gather/gatherers/global-listeners-test.js
  71. +3 −12 core/test/gather/gatherers/js-usage-test.js
  72. +6 −18 core/test/gather/gatherers/source-maps-test.js
  73. +18 −31 core/test/gather/gatherers/trace-elements-test.js
  74. +6 −1 core/test/gather/mock-driver.js
  75. +26 −34 core/test/lib/emulation-test.js
  76. +13 −0 core/test/lib/network-recorder-test.js
  77. +11 −0 core/test/lib/stack-packs-test.js
  78. +335 −15 core/test/results/sample_v2.json
  79. +188 −174 core/test/runner-test.js
  80. +24 −0 core/test/scenarios/__snapshots__/api-test-pptr.js.snap
  81. +2 −2 docs/plugins.md
  82. +2 −0 docs/recipes/integration-test/example-lh-auth.test.js
  83. +1 −1 docs/recipes/lighthouse-plugin-example/package.json
  84. +1 −1 docs/recipes/type-checking/package.json
  85. +2 −0 flow-report/test/flow-report-pptr-test.ts
  86. +5 −5 package.json
  87. +3 −0 proto/lighthouse-result.proto
  88. +5 −1 report/assets/styles.css
  89. +1 −0 report/renderer/category-renderer.js
  90. +1 −1 report/renderer/components.js
  91. +1 −1 report/test/generator/report-generator-test.js
  92. +7 −4 report/test/renderer/category-renderer-test.js
  93. +4 −1 report/test/renderer/report-renderer-axe-test.js
  94. +233 −2 shared/localization/locales/ar-XB.json
  95. +233 −2 shared/localization/locales/ar.json
  96. +233 −2 shared/localization/locales/bg.json
  97. +233 −2 shared/localization/locales/ca.json
  98. +246 −15 shared/localization/locales/cs.json
  99. +239 −8 shared/localization/locales/da.json
  100. +238 −7 shared/localization/locales/de.json
  101. +234 −3 shared/localization/locales/el.json
  102. +233 −2 shared/localization/locales/en-GB.json
  103. +87 −0 shared/localization/locales/en-US.json
  104. +233 −2 shared/localization/locales/en-XA.json
  105. +87 −0 shared/localization/locales/en-XL.json
  106. +233 −2 shared/localization/locales/es-419.json
  107. +233 −2 shared/localization/locales/es.json
  108. +233 −2 shared/localization/locales/fi.json
  109. +236 −5 shared/localization/locales/fil.json
  110. +235 −4 shared/localization/locales/fr.json
  111. +233 −2 shared/localization/locales/he.json
  112. +236 −5 shared/localization/locales/hi.json
  113. +234 −3 shared/localization/locales/hr.json
  114. +233 −2 shared/localization/locales/hu.json
  115. +233 −2 shared/localization/locales/id.json
  116. +234 −3 shared/localization/locales/it.json
  117. +233 −2 shared/localization/locales/ja.json
  118. +233 −2 shared/localization/locales/ko.json
  119. +233 −2 shared/localization/locales/lt.json
  120. +250 −19 shared/localization/locales/lv.json
  121. +233 −2 shared/localization/locales/nl.json
  122. +235 −4 shared/localization/locales/no.json
  123. +233 −2 shared/localization/locales/pl.json
  124. +233 −2 shared/localization/locales/pt-PT.json
  125. +234 −3 shared/localization/locales/pt.json
  126. +233 −2 shared/localization/locales/ro.json
  127. +233 −2 shared/localization/locales/ru.json
  128. +233 −2 shared/localization/locales/sk.json
  129. +233 −2 shared/localization/locales/sl.json
  130. +233 −2 shared/localization/locales/sr-Latn.json
  131. +233 −2 shared/localization/locales/sr.json
  132. +233 −2 shared/localization/locales/sv.json
  133. +233 −2 shared/localization/locales/ta.json
  134. +233 −2 shared/localization/locales/te.json
  135. +233 −2 shared/localization/locales/th.json
  136. +233 −2 shared/localization/locales/tr.json
  137. +233 −2 shared/localization/locales/uk.json
  138. +233 −2 shared/localization/locales/vi.json
  139. +233 −2 shared/localization/locales/zh-HK.json
  140. +235 −4 shared/localization/locales/zh-TW.json
  141. +239 −8 shared/localization/locales/zh.json
  142. +1 −1 third-party/devtools-tests/e2e/lighthouse/devtools-settings_test.ts
  143. +5 −5 third-party/devtools-tests/e2e/lighthouse/navigation_test.ts
  144. +2 −2 third-party/devtools-tests/e2e/lighthouse/snapshot_test.ts
  145. +1 −1 third-party/devtools-tests/e2e/lighthouse/start-view_test.ts
  146. +1 −1 third-party/devtools-tests/e2e/lighthouse/timespan_test.ts
  147. +2 −0 treemap/test/treemap-test-pptr.js
  148. +1 −1 tsconfig.json
  149. +9 −2 types/artifacts.d.ts
  150. +2 −0 viewer/test/viewer-test-pptr.js
  151. +78 −72 yarn.lock
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,9 @@ on:
branches: [main]
pull_request: # run on all PRs, not just PRs to a particular branch

env:
PUPPETEER_SKIP_DOWNLOAD: 1

jobs:
# `basics` includes all non-smoke and non-unit CI
basics:
3 changes: 2 additions & 1 deletion .github/workflows/devtools.yml
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ on:
env:
DEPOT_TOOLS_PATH: ${{ github.workspace }}/depot-tools
DEVTOOLS_PATH: ${{ github.workspace }}/devtools-frontend
PUPPETEER_SKIP_DOWNLOAD: 1

jobs:
build:
@@ -175,4 +176,4 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: Smokehouse (devtools smoke)
path: ${{ github.workspace }}/lighthouse/.tmp/smokehouse-ci-failures/
path: ${{ github.workspace }}/lighthouse/.tmp/smokehouse-failures/
3 changes: 3 additions & 0 deletions .github/workflows/package-test.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,9 @@ on:
branches: [main]
pull_request: # run on all PRs, not just PRs to a particular branch

env:
PUPPETEER_SKIP_DOWNLOAD: 1

jobs:
package-test:
runs-on: ubuntu-latest
13 changes: 8 additions & 5 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,9 @@ on:
branches: [main]
pull_request: # run on all PRs, not just PRs to a particular branch

env:
PUPPETEER_SKIP_DOWNLOAD: 1

jobs:
# `smoke` runs as a matrix across 6 jobs:
# * The smoke tests are split into 3 batches, to parallelize.
@@ -72,7 +75,7 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: Smokehouse (ubuntu; chrome ${{ matrix.chrome-channel }})
path: .tmp/smokehouse-ci-failures/
path: .tmp/smokehouse-failures/

smoke-windows:
strategy:
@@ -115,7 +118,7 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: Smokehouse (windows)
path: .tmp/smokehouse-ci-failures/
path: .tmp/smokehouse-failures/

smoke-legacy:
strategy:
@@ -163,7 +166,7 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: Smokehouse (legacy)
path: .tmp/smokehouse-ci-failures/
path: .tmp/smokehouse-failures/

smoke-bundle:
strategy:
@@ -211,7 +214,7 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: Smokehouse (bundled)
path: .tmp/smokehouse-ci-failures/
path: .tmp/smokehouse-failures/

smoke-bundle-legacy:
strategy:
@@ -259,4 +262,4 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: Smokehouse (bundled)
path: .tmp/smokehouse-ci-failures/
path: .tmp/smokehouse-failures/
3 changes: 3 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,9 @@ on:
branches: [main]
pull_request: # run on all PRs, not just PRs to a particular branch

env:
PUPPETEER_SKIP_DOWNLOAD: 1

jobs:
# `unit` includes just unit and proto tests.
unit:
64 changes: 64 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,67 @@
<a name="10.4.0"></a>
# 10.4.0 (2023-07-10)
[Full Changelog](https://github.com/GoogleChrome/lighthouse/compare/v10.3.0...v10.4.0)

We expect this release to ship in the DevTools of [Chrome 117](https://chromiumdash.appspot.com/schedule), and to PageSpeed Insights within 2 weeks.

## New Contributors

Thanks to our new contributors 👽🐷🐰🐯🐻!

- Sanjaiyan Parthipan @sanjaiyan-dev

## New Audits

* add hidden, 0-weight a11y audits ([#15216](https://github.com/GoogleChrome/lighthouse/pull/15216))
* aria-dialog-name, aria-text, link-in-text-block, select-name ([#15159](https://github.com/GoogleChrome/lighthouse/pull/15159))

## Core

* remove unnecessary references to legacy gatherer ([#15236](https://github.com/GoogleChrome/lighthouse/pull/15236))
* update residual usages of legacy runner ([#15227](https://github.com/GoogleChrome/lighthouse/pull/15227))
* compute TBT impact for main thread tasks ([#15175](https://github.com/GoogleChrome/lighthouse/pull/15175))
* support ts targets before es2022 ([#15189](https://github.com/GoogleChrome/lighthouse/pull/15189))
* byte-efficiency: compute FCP & LCP savings ([#15104](https://github.com/GoogleChrome/lighthouse/pull/15104))
* config: add more validation from legacy ([#15211](https://github.com/GoogleChrome/lighthouse/pull/15211))
* link-text: add tamil keywords to blocklist ([#15152](https://github.com/GoogleChrome/lighthouse/pull/15152))
* long-tasks: add more task information to debugData ([#15198](https://github.com/GoogleChrome/lighthouse/pull/15198))
* network-recorder: set target type of unfinished request ([#15232](https://github.com/GoogleChrome/lighthouse/pull/15232))
* non-composited-animations: add CLS savings as always 0 ([#15099](https://github.com/GoogleChrome/lighthouse/pull/15099))
* prioritize-lcp-image: add LCP savings ([#15229](https://github.com/GoogleChrome/lighthouse/pull/15229))
* proto: add errorStack to AuditResult ([#15187](https://github.com/GoogleChrome/lighthouse/pull/15187))
* redirects: add FCP and LCP savings ([#15228](https://github.com/GoogleChrome/lighthouse/pull/15228))
* source-maps: support BOM markers and CORB prefix ([#15224](https://github.com/GoogleChrome/lighthouse/pull/15224))
* stacks: add wix ([#15171](https://github.com/GoogleChrome/lighthouse/pull/15171))
* unsized-images: add CLS savings as always 0 ([#15196](https://github.com/GoogleChrome/lighthouse/pull/15196))
* viewport: add INP savings ([#15071](https://github.com/GoogleChrome/lighthouse/pull/15071))
* work-during-interaction: add INP savings ([#15176](https://github.com/GoogleChrome/lighthouse/pull/15176))

## Report

* use fixed position for hidden radios ([#15181](https://github.com/GoogleChrome/lighthouse/pull/15181))

## Deps

* upgrade puppeteer to 20.8 ([#15226](https://github.com/GoogleChrome/lighthouse/pull/15226))
* upgrade third-party-web to 0.23.3 ([#15213](https://github.com/GoogleChrome/lighthouse/pull/15213))

## I18n

* import ([#15243](https://github.com/GoogleChrome/lighthouse/pull/15243))

## Tests

* save smokehouse failures, improve bundle runner logging ([#15235](https://github.com/GoogleChrome/lighthouse/pull/15235))
* remove usages of legacy driver ([#15230](https://github.com/GoogleChrome/lighthouse/pull/15230))
* a11y: use regex for target size explanation ([#15231](https://github.com/GoogleChrome/lighthouse/pull/15231))
* ci: skip puppeteer Chrome download ([#15177](https://github.com/GoogleChrome/lighthouse/pull/15177))
* config: add unit tests from legacy config ([#15209](https://github.com/GoogleChrome/lighthouse/pull/15209))
* devtools: fix e2e compile error ([#15210](https://github.com/GoogleChrome/lighthouse/pull/15210))
* devtools: remove parallel modifier from e2e tests ([#15172](https://github.com/GoogleChrome/lighthouse/pull/15172))
* issues-mixed-content: use new site for testing ([#15241](https://github.com/GoogleChrome/lighthouse/pull/15241))
* runner: drop usages of legacy runner ([#15047](https://github.com/GoogleChrome/lighthouse/pull/15047))
* smoke: expect server-response-time to be greater than 0 ([#15188](https://github.com/GoogleChrome/lighthouse/pull/15188))

<a name="10.3.0"></a>
# 10.3.0 (2023-06-13)
[Full Changelog](https://github.com/GoogleChrome/lighthouse/compare/v10.2.0...v10.3.0)
49 changes: 45 additions & 4 deletions cli/test/fixtures/a11y/a11y_tester.html
Original file line number Diff line number Diff line change
@@ -24,6 +24,14 @@
aria-checked="true">
</div>
</section>
<p>aria-command-name</p>
<section>
<div id="aria-command-name" role="button"></div>
</section>
<p>aria-dialog-name</p>
<section>
<div role="alertdialog" id="aria-dialog-name" aria-label=""></div>
</section>
<p>aria-hidden-focus</p>
<section>
<div id="aria-hidden-focus" aria-hidden="true">
@@ -44,10 +52,6 @@
<div id="aria-treeitem-name" role="treeitem"></div>
</div>
</section>
<p>aria-command-name</p>
<section>
<div id="aria-command-name" role="button"></div>
</section>
<p>aria-tooltip-name</p>
<section>
<div id="aria-tooltip-name" role="tooltip"></div>
@@ -84,6 +88,12 @@
<section>
<div role="foo"></div>
</section>
<p>aria-text</p>
<section>
<span role="text" id="aria-text">
<a href="google.com">Not announced</a>
</span>
</section>
<p>aria-valid-attr</p>
<section>
<div
@@ -135,6 +145,10 @@
<div id="duplicate-id-aria"></div>
<input type="text" aria-labelledby="duplicate-id-aria"/>
</section>
<p>empty-heading</p>
<section>
<h1 id="empty-heading"></h1>
</section>
<p>form-field-multiple-labels</p>
<section>
<label for="form-field-multiple-labels" id="label1">label1</label>
@@ -150,6 +164,11 @@
<h1>top header</h1>
<h3>sub-sub-header</h3>
</section>
<p>identical-links-same-purpose</p>
<section>
<a id="identical-links-same-purpose-1" href="https://example.com/" aria-label="a link"></a>
<a id="identical-links-same-purpose-2" href="https://google.com/" aria-label="a link"></a>
</section>
<p>image-alt</p>
<section>
<img
@@ -180,6 +199,19 @@ <h3>sub-sub-header</h3>
<table id="layout-table">
</table>
</section>
<p>link-in-text-block</p>
<section>
<p>
paragraph text
<a
style="text-decoration: none; color: blue"
href="#"
id="link-in-text-block">
link text
</a>
paragraph text
</p>
</section>
<p>link-name</p>
<section>
<a id="link-name" href="google.com"></a>
@@ -198,6 +230,10 @@ <h3>sub-sub-header</h3>
<section>
<object id="object-alt" data="data:text/html,data"></object>
</section>
<p>select-name</p>
<section>
<select id="select-name"></select>
</section>
<p>tabindex</p>
<section>
<div
@@ -212,6 +248,11 @@ <h3>sub-sub-header</h3>
<tr><td>foo</td><td>foo</td><tr>
</table>
</section>
<p>target-size</p>
<section>
<button id="target-size-1">+</button>
<span role="button" tabindex="0" id="target-size-2">o</span>
</section>
<p>td-has-header</p>
<section>
<table id="td-has-header">
32 changes: 19 additions & 13 deletions cli/test/smokehouse/frontends/smokehouse-bin.js
Original file line number Diff line number Diff line change
@@ -25,6 +25,8 @@ import {runSmokehouse, getShardedDefinitions} from '../smokehouse.js';
import {updateTestDefnFormat} from './back-compat-util.js';
import {LH_ROOT} from '../../../../root.js';
import exclusions from '../config/exclusions.js';
import {saveArtifacts} from '../../../../core/lib/asset-saver.js';
import {saveLhr} from '../../../../core/lib/asset-saver.js';

const coreTestDefnsPath =
path.join(LH_ROOT, 'cli/test/smokehouse/core-tests.js');
@@ -230,19 +232,23 @@ async function begin() {
if (!smokehouseResult.success) {
const failedTestResults = smokehouseResult.testResults.filter(r => r.failed);

// For CI, save failed runs to directory to be uploaded.
if (process.env.CI) {
const failuresDir = `${LH_ROOT}/.tmp/smokehouse-ci-failures`;
fs.mkdirSync(failuresDir, {recursive: true});

for (const testResult of failedTestResults) {
for (let i = 0; i < testResult.runs.length; i++) {
const run = testResult.runs[i];
fs.writeFileSync(`${failuresDir}/${testResult.id}-${i}.json`, JSON.stringify({
...run,
lighthouseLog: run.lighthouseLog.split('\n'),
assertionLog: run.assertionLog.split('\n'),
}, null, 2));
// Save failed runs to directory. In CI, this is uploaded as an artifact.
const failuresDir = `${LH_ROOT}/.tmp/smokehouse-failures`;
fs.rmSync(failuresDir, {recursive: true, force: true});
fs.mkdirSync(failuresDir);

for (const testResult of failedTestResults) {
for (let i = 0; i < testResult.runs.length; i++) {
const runDir = `${failuresDir}/${i}/${testResult.id}`;
fs.mkdirSync(runDir, {recursive: true});

const run = testResult.runs[i];
await saveArtifacts(run.artifacts, runDir);
await saveLhr(run.lhr, runDir);
fs.writeFileSync(`${runDir}/assertionLog.txt`, run.assertionLog);
fs.writeFileSync(`${runDir}/lighthouseLog.txt`, run.lighthouseLog);
if (run.networkRequests) {
fs.writeFileSync(`${runDir}/networkRequests.txt`, run.networkRequests.join('\n'));
}
}
}
8 changes: 3 additions & 5 deletions cli/test/smokehouse/lighthouse-runners/bundle.js
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@ async function runBundledLighthouse(url, config, testRunnerOptions) {

// Run Lighthouse.
try {
const logLevel = testRunnerOptions.isDebug ? 'info' : undefined;
const logLevel = testRunnerOptions.isDebug ? 'verbose' : 'info';
let runnerResult;
if (testRunnerOptions.useLegacyNavigation) {
const connection = new CriConnection(port);
@@ -124,12 +124,10 @@ async function runLighthouse(url, config, testRunnerOptions = {}) {
worker.stdout.setEncoding('utf8');
worker.stderr.setEncoding('utf8');
worker.stdout.addListener('data', (data) => {
process.stdout.write(data);
logs.push(`STDOUT: ${data}`);
logs.push(`[STDOUT] ${data}`);
});
worker.stderr.addListener('data', (data) => {
process.stderr.write(data);
logs.push(`STDERR: ${data}`);
logs.push(`[STDERR] ${data}`);
});
const [workerResponse] = await once(worker, 'message');
const log = logs.join('') + '\n';
Loading