Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
servusdei2018 authored Nov 13, 2024
2 parents 9492cba + 2566009 commit 5ea6d4d
Show file tree
Hide file tree
Showing 394 changed files with 273,839 additions and 84,816 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ module.exports = {
vars: 'all',
args: 'after-used',
argsIgnorePattern: '(^reject$|^_+$)',
varsIgnorePattern: '(^_$|^LH$|^Lantern$)',
varsIgnorePattern: '(^_$|^LH$|^Lantern$|^TraceEngine$|^Protocol$)',
}],
'no-cond-assign': 2,
'space-infix-ops': 2,
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# https://github.com/actions/runner/issues/438
steps:
- name: git clone
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 100
- run: bash core/scripts/github-actions-commit-range.sh
Expand All @@ -30,7 +30,7 @@ jobs:
GITHUB_CONTEXT_BASE_SHA: ${{ github.event.before }}

- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x

Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
BT_API_AUTH_TOKEN: ${{ secrets.BT_API_AUTH_TOKEN }}

- name: Upload dist
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
8 changes: 4 additions & 4 deletions .github/workflows/cron-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ jobs:
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: gaurav-nelson/github-action-markdown-link-check@a996638015fbc9ef96beef1a41bbad7df8e06154
# checks all markdown files from /docs including all subfolders
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.github/workflows/markdown.links.config.json'
folder-path: 'docs/'
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: gaurav-nelson/github-action-markdown-link-check@a996638015fbc9ef96beef1a41bbad7df8e06154
# checks all markdown files from root but ignores subfolders
with:
Expand All @@ -30,9 +30,9 @@ jobs:

steps:
- name: git clone
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
- run: yarn --frozen-lockfile
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/devtools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
run: echo "$DEPOT_TOOLS_PATH" >> $GITHUB_PATH

- name: git clone
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: lighthouse

- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x

Expand Down Expand Up @@ -87,12 +87,12 @@ jobs:

steps:
- name: git clone
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: lighthouse

- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x

Expand Down Expand Up @@ -133,12 +133,12 @@ jobs:

steps:
- name: git clone
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: lighthouse

- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x

Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:

- name: Upload failures
if: failure()
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: Smokehouse (devtools smoke)
path: ${{ github.workspace }}/lighthouse/.tmp/smokehouse-failures/
4 changes: 2 additions & 2 deletions .github/workflows/package-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:

steps:
- name: git clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: print latest_commit
run: echo ${{ github.sha }}

Expand All @@ -28,8 +28,8 @@ jobs:
(github.repository == 'GoogleChrome/lighthouse' && ${{ needs.check_date.outputs.should_run != 'false' }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/
Expand Down
28 changes: 18 additions & 10 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ jobs:

steps:
- name: git clone
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Depth of at least 2 for codecov coverage diffs. See https://github.com/GoogleChrome/lighthouse/pull/12079
fetch-depth: 2

- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x

Expand All @@ -55,6 +55,14 @@ jobs:
yarn c8 yarn smoke --debug -j=2 --retries=2 --shard=${{ matrix.smoke-test-shard }}/$SHARD_TOTAL
yarn c8 report --reporter text-lcov > smoke-coverage.lcov
# TODO(15841): remove when using trace by default, and we want to remove CDT graph impl.
- name: Run smoke tests (lantern + trace)
if: matrix.smoke-test-shard == 1 && matrix.chrome-channel == 'ToT'
run: |
yarn smoke --debug -j=2 --retries=2 lantern
env:
INTERNAL_LANTERN_USE_TRACE: 1

- name: Upload test coverage to Codecov
if: matrix.chrome-channel == 'ToT'
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
Expand All @@ -67,7 +75,7 @@ jobs:

- name: Upload failures
if: failure()
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: Smokehouse (ubuntu; chrome ${{ matrix.chrome-channel }})
path: .tmp/smokehouse-failures/
Expand All @@ -83,11 +91,11 @@ jobs:

steps:
- name: git clone
uses: actions/checkout@v3
uses: actions/checkout@v4

# Use Node 18 here earlier than everywhere else, see https://github.com/GoogleChrome/lighthouse/issues/15160#issuecomment-1589913408
- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x

Expand All @@ -103,14 +111,14 @@ jobs:

- name: Run smoke tests
# Windows bots are slow, so only run enough tests to verify matching behavior.
run: yarn smoke --debug -j=2 --retries=5 --shard=${{ matrix.smoke-test-shard }}/2 dbw oopif offline lantern metrics
run: yarn smoke --debug -j=2 --retries=5 --shard=${{ matrix.smoke-test-shard }}/2 dbw oopif lantern metrics

# Fail if any changes were written to source files.
- run: git diff --exit-code

- name: Upload failures
if: failure()
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: Smokehouse (windows)
path: .tmp/smokehouse-failures/
Expand All @@ -132,10 +140,10 @@ jobs:

steps:
- name: git clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x

Expand All @@ -154,7 +162,7 @@ jobs:

- name: Upload failures
if: failure()
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: Smokehouse (bundled)
path: .tmp/smokehouse-failures/
13 changes: 8 additions & 5 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:

steps:
- name: git clone
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Depth of at least 2 for codecov coverage diffs. See https://github.com/GoogleChrome/lighthouse/pull/12079
fetch-depth: 2

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

Expand Down Expand Up @@ -62,6 +62,9 @@ jobs:
- name: yarn unit
if: ${{ matrix.node != env.LATEST_NODE }}
run: yarn unit:ci
- name: yarn unit-lantern-trace
if: ${{ matrix.node != env.LATEST_NODE }}
run: yarn unit-lantern-trace:ci

# Only gather coverage on latest node, where c8 is the most accurate.
- name: yarn unit:cicoverage
Expand All @@ -82,7 +85,7 @@ jobs:

- name: Upload failures
if: failure()
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: Unit (ubuntu; node ${{ matrix.node }})
path: .tmp/unit-failures/
Expand All @@ -94,10 +97,10 @@ jobs:

steps:
- name: git clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x

Expand Down
5 changes: 5 additions & 0 deletions build/build-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ async function buildBundle(entryPath, distPath, opts = {minify: true}) {
shimsObj[`${LH_ROOT}/shared/localization/locales.js`] = 'export const locales = {};';
}

// Don't bundle third-party-web (CDT provides its own copy). This prevents duplications of 40+ KB.
if (isDevtools(entryPath)) {
shimsObj['third-party-web/nostats-subset.js'] = 'export default {};';
}

for (const modulePath of modulesToIgnore) {
shimsObj[modulePath] = 'export default {}';
}
Expand Down
Loading

0 comments on commit 5ea6d4d

Please sign in to comment.