Skip to content

Commit

Permalink
Merge branch 'main' into lcp-elem-savings
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine committed Aug 11, 2023
2 parents 5a5be83 + 53c1b7b commit c456dfa
Show file tree
Hide file tree
Showing 398 changed files with 29,101 additions and 14,787 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ third-party/**
# ignore d.ts files until we can properly lint them
**/*.d.ts
**/*.d.cts

page-functions-test-case*out*.js
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:
# https://github.com/actions/runner/issues/438
steps:
- name: git clone
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 100
- run: bash core/scripts/github-actions-commit-range.sh
env:
GITHUB_CONTEXT_PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_CONTEXT_BASE_SHA: ${{ github.event.before }}

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

- run: yarn install --frozen-lockfile --network-timeout 1000000
- run: yarn type-check
Expand Down
12 changes: 6 additions & 6 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@master
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
# 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@master
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
# checks all markdown files from root but ignores subfolders
with:
Expand All @@ -30,11 +30,11 @@ jobs:

steps:
- name: git clone
uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
- run: yarn --frozen-lockfile

- run: yarn mocha --testMatch=third-party/chromium-synchronization/*-test.js
26 changes: 13 additions & 13 deletions .github/workflows/devtools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
run: echo "$DEPOT_TOOLS_PATH" >> $GITHUB_PATH

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

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

- name: Generate cache hash
run: bash $GITHUB_WORKSPACE/lighthouse/.github/scripts/generate-devtools-hash.sh > cdt-test-hash.txt
Expand Down Expand Up @@ -87,14 +87,14 @@ jobs:

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

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

- run: yarn --frozen-lockfile --network-timeout 1000000
working-directory: ${{ github.workspace }}/lighthouse
Expand Down Expand Up @@ -132,14 +132,14 @@ jobs:

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

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

- name: Load build artifacts
id: devtools-build-artifacts
Expand Down Expand Up @@ -176,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/
32 changes: 4 additions & 28 deletions .github/workflows/package-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:

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

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

- run: yarn install --frozen-lockfile --network-timeout 1000000
- run: yarn build-report
Expand All @@ -32,27 +32,3 @@ jobs:

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

package-test-legacy:
runs-on: ubuntu-latest
name: Package Test Legacy Navigation
env:
FORCE_COLOR: true

steps:
- name: git clone
uses: actions/checkout@v2

- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x

- run: yarn install --frozen-lockfile --network-timeout 1000000
- run: yarn build-report
- run: sudo apt-get install xvfb

- run: xvfb-run --auto-servernum bash $GITHUB_WORKSPACE/core/scripts/release/package-test.sh --legacy-navigation

# Fail if any changes were written to source files.
- run: git diff --exit-code
8 changes: 4 additions & 4 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@v2
- uses: actions/checkout@v3
- name: print latest_commit
run: echo ${{ github.sha }}

Expand All @@ -28,10 +28,10 @@ jobs:
(github.repository == 'GoogleChrome/lighthouse' && ${{ needs.check_date.outputs.should_run != 'false' }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
registry-url: https://registry.npmjs.org/
- run: yarn --frozen-lockfile

Expand Down
126 changes: 15 additions & 111 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ jobs:

steps:
- name: git clone
uses: actions/checkout@v2
uses: actions/checkout@v3
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 16.x
uses: actions/setup-node@v1
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x

- name: Define ToT chrome path
if: matrix.chrome-channel == 'ToT'
Expand All @@ -62,7 +62,7 @@ jobs:
- name: Upload test coverage to Codecov
if: matrix.chrome-channel == 'ToT'
uses: codecov/codecov-action@6004246f47ab62d32be025ce173b241cd84ac58e
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
with:
flags: smoke
file: ./smoke-coverage.lcov
Expand All @@ -75,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:
Expand All @@ -88,11 +88,11 @@ jobs:

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

# 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@v1
uses: actions/setup-node@v3
with:
node-version: 18.x

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

smoke-legacy:
strategy:
matrix:
smoke-test-shard: [1, 2, 3]
# e.g. if set 1 fails, continue with set 2 anyway
fail-fast: false
runs-on: ubuntu-latest
env:
# The total number of shards. Set dynamically when length of *single* matrix variable is
# computable. See https://git.luolix.topmunity/t/get-length-of-strategy-matrix-or-get-all-matrix-options/18342
SHARD_TOTAL: 3
FORCE_COLOR: true
name: Legacy Navigation ${{ matrix.smoke-test-shard }}/3

steps:
- name: git clone
uses: actions/checkout@v2

- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x

- run: yarn install --frozen-lockfile --network-timeout 1000000
- run: yarn build-report
- run: yarn reset-link

- name: Define ToT chrome path
run: echo "CHROME_PATH=/home/runner/chrome-linux-tot/chrome" >> $GITHUB_ENV

- name: Install Chrome ToT
working-directory: /home/runner
run: bash $GITHUB_WORKSPACE/core/scripts/download-chrome.sh && mv chrome-linux chrome-linux-tot

- run: sudo apt-get install xvfb
- name: yarn smoke --legacy-navigation
run: xvfb-run --auto-servernum yarn smoke --debug --legacy-navigation -j=2 --retries=2 --shard=${{ matrix.smoke-test-shard }}/$SHARD_TOTAL

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

- name: Upload failures
if: failure()
uses: actions/upload-artifact@v1
with:
name: Smokehouse (legacy)
path: .tmp/smokehouse-ci-failures/
path: .tmp/smokehouse-failures/

smoke-bundle:
strategy:
Expand All @@ -184,12 +136,12 @@ jobs:

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

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

- run: yarn install --frozen-lockfile --network-timeout 1000000
- run: yarn build-report
Expand All @@ -204,7 +156,7 @@ jobs:

- run: sudo apt-get install xvfb
- name: yarn test-bundle
run: xvfb-run --auto-servernum yarn test-bundle --shard=${{ matrix.smoke-test-shard }}/$SHARD_TOTAL
run: xvfb-run --auto-servernum yarn test-bundle --shard=${{ matrix.smoke-test-shard }}/$SHARD_TOTAL --retries=2

# Fail if any changes were written to source files.
- run: git diff --exit-code
Expand All @@ -214,52 +166,4 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: Smokehouse (bundled)
path: .tmp/smokehouse-ci-failures/

smoke-bundle-legacy:
strategy:
matrix:
smoke-test-shard: [1, 2, 3]
# e.g. if set 1 fails, continue with set 2 anyway
fail-fast: false
runs-on: ubuntu-latest
env:
# The total number of shards. Set dynamically when length of *single* matrix variable is
# computable. See https://git.luolix.topmunity/t/get-length-of-strategy-matrix-or-get-all-matrix-options/18342
SHARD_TOTAL: 3
FORCE_COLOR: true
name: Bundled Legacy Navigation ${{ matrix.smoke-test-shard }}/3

steps:
- name: git clone
uses: actions/checkout@v2

- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x

- run: yarn install --frozen-lockfile --network-timeout 1000000
- run: yarn build-report
- run: yarn build-devtools

- name: Define ToT chrome path
run: echo "CHROME_PATH=/home/runner/chrome-linux-tot/chrome" >> $GITHUB_ENV

- name: Install Chrome ToT
working-directory: /home/runner
run: bash $GITHUB_WORKSPACE/core/scripts/download-chrome.sh && mv chrome-linux chrome-linux-tot

- run: sudo apt-get install xvfb
- name: yarn test-bundle
run: xvfb-run --auto-servernum yarn test-bundle --legacy-navigation --shard=${{ matrix.smoke-test-shard }}/$SHARD_TOTAL

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

- name: Upload dist
if: failure()
uses: actions/upload-artifact@v1
with:
name: Smokehouse (bundled)
path: .tmp/smokehouse-ci-failures/
path: .tmp/smokehouse-failures/
Loading

0 comments on commit c456dfa

Please sign in to comment.