Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into esm-core
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed Jun 27, 2022
2 parents 72af740 + 00a45a1 commit 7ba8fc1
Show file tree
Hide file tree
Showing 65 changed files with 2,731 additions and 2,280 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ coverage/**

!.eslintrc.js

lighthouse-core/lib/cdt/generated/SourceMap.js
lighthouse-core/scripts/legacy-javascript/variants

third-party/**
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/generate-devtools-hash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ cd "$LH_ROOT"
bash .github/scripts/print-devtools-relevant-commits.sh
md5 \
lighthouse-core/test/chromium-web-tests/* \
third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/**/*.*
third-party/chromium-webtests/webtests/http/tests/devtools/lighthouse/**/*.* \
third-party/devtools-tests/e2e/**/*.*
54 changes: 46 additions & 8 deletions .github/workflows/devtools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,15 @@ jobs:
${{ env.BLINK_TOOLS_PATH }}
${{ github.workspace }}/lighthouse/.tmp/chromium-web-tests/content-shells
${{ github.workspace }}/.gclient
${{ github.workspace }}/.gclient_entries
# This hash key changes:
# 1) every monday (so invalidates once a week)
# 2) every commit to CDT touching files important to Lighthouse web tests
# 3) every change to file in Lighthouse repo important to running these tests.
#
# The number is how many times this hash key was manually updated to break the cache.
key: ${{ runner.os }}-5-${{ env.WEEK_OF_THE_YEAR }}-${{ hashFiles('cdt-test-hash.txt') }}
restore-keys: ${{ runner.os }}-5
key: ${{ runner.os }}-7-${{ env.WEEK_OF_THE_YEAR }}-${{ hashFiles('cdt-test-hash.txt') }}
restore-keys: ${{ runner.os }}-7
- name: Set GHA_DEVTOOLS_CACHE_HIT
if: steps.devtools-cache.outputs.cache-hit == 'true'
run: echo "GHA_DEVTOOLS_CACHE_HIT=1" >> $GITHUB_ENV
Expand All @@ -73,11 +74,48 @@ jobs:
uses: actions/cache@v3
with:
path: |
${{ env.DEVTOOLS_PATH }}/out/Default/gen/front_end
${{ env.DEVTOOLS_PATH }}/test/webtests
${{ env.DEVTOOLS_PATH }}
${{ github.workspace }}/.gclient
${{ github.workspace }}/.gclient_entries
key: devtools-build-artifacts-${{ github.run_id }}

e2e:
needs: [build]
runs-on: macos-latest

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

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

- run: yarn --frozen-lockfile --network-timeout 1000000
working-directory: ${{ github.workspace }}/lighthouse

- name: Set $PATH
run: echo "$DEPOT_TOOLS_PATH" >> $GITHUB_PATH
# For vpython.
- name: Download depot tools
run: bash $GITHUB_WORKSPACE/lighthouse/lighthouse-core/test/chromium-web-tests/download-depot-tools.sh

- name: Load build artifacts
id: devtools-build-artifacts
uses: actions/cache@v3
with:
path: |
${{ env.DEVTOOLS_PATH }}
${{ github.workspace }}/.gclient
${{ github.workspace }}/.gclient_entries
key: devtools-build-artifacts-${{ github.run_id }}

- name: Run e2e tests
run: bash $GITHUB_WORKSPACE/lighthouse/lighthouse-core/test/devtools-tests/run-e2e-tests.sh

web-tests:
needs: [build]
runs-on: macos-latest
Expand All @@ -98,9 +136,9 @@ jobs:
uses: actions/cache@v3
with:
path: |
${{ env.DEVTOOLS_PATH }}/out/Default/gen/front_end
${{ env.DEVTOOLS_PATH }}/test/webtests
${{ env.DEVTOOLS_PATH }}
${{ github.workspace }}/.gclient
${{ github.workspace }}/.gclient_entries
key: devtools-build-artifacts-${{ github.run_id }}

- name: Download Blink Tools
Expand Down Expand Up @@ -147,9 +185,9 @@ jobs:
uses: actions/cache@v3
with:
path: |
${{ env.DEVTOOLS_PATH }}/out/Default/gen/front_end
${{ env.DEVTOOLS_PATH }}/test/webtests
${{ env.DEVTOOLS_PATH }}
${{ github.workspace }}/.gclient
${{ github.workspace }}/.gclient_entries
key: devtools-build-artifacts-${{ github.run_id }}

- name: Download Blink Tools
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/package-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
- run: sudo apt-get install xvfb

# Disabled to fix CI while we investigate what the bug is.
# perf-diagnostics-third-party
- run: xvfb-run --auto-servernum bash $GITHUB_WORKSPACE/lighthouse-core/scripts/release/package-test.sh --fraggle-rock --invert-match perf-diagnostics-third-party
# perf-diagnostics-third-party, oopif-requests, oopif-scripts
- run: xvfb-run --auto-servernum bash $GITHUB_WORKSPACE/lighthouse-core/scripts/release/package-test.sh --fraggle-rock --invert-match perf-diagnostics-third-party oopif-requests oopif-scripts

# Fail if any changes were written to source files.
- run: git diff --exit-code
22 changes: 20 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,27 @@ on:
workflow_dispatch: {}

jobs:
check_date:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v2
- name: print latest_commit
run: echo ${{ github.sha }}

- id: should_run
continue-on-error: true
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="1 day" ${{ github.sha }}) && echo "::set-output name=should_run::false"

publish:
# Prevent forks from running this job.
if: (github.event_name == 'schedule' && github.repository == 'GoogleChrome/lighthouse') || (github.event_name != 'schedule')
# Prevent scheduled job from running if...
# 1) this is a fork
# 2) there has not been a change in the last day
if: |
github.event_name != 'schedule' ||
(github.repository == 'GoogleChrome/lighthouse' && ${{ needs.check_date.outputs.should_run != 'false' }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ jobs:
- run: sudo apt-get install xvfb
- name: yarn smoke --fraggle-rock
# Disabled to fix CI while we investigate what the bug is.
# perf-diagnostics-third-party
run: xvfb-run --auto-servernum yarn smoke --debug --fraggle-rock -j=2 --retries=2 --shard=${{ matrix.smoke-test-shard }}/$SHARD_TOTAL --invert-match perf-diagnostics-third-party
# perf-diagnostics-third-party, oopif-requests, oopif-scripts
run: xvfb-run --auto-servernum yarn smoke --debug --fraggle-rock -j=2 --retries=2 --shard=${{ matrix.smoke-test-shard }}/$SHARD_TOTAL --invert-match perf-diagnostics-third-party oopif-requests oopif-scripts

# Fail if any changes were written to source files.
- run: git diff --exit-code
Expand Down Expand Up @@ -220,8 +220,8 @@ jobs:
- run: sudo apt-get install xvfb
- name: yarn test-bundle
# Disabled to fix CI while we investigate what the bug is.
# perf-diagnostics-third-party
run: xvfb-run --auto-servernum yarn test-bundle --fraggle-rock --shard=${{ matrix.smoke-test-shard }}/$SHARD_TOTAL --invert-match perf-diagnostics-third-party
# perf-diagnostics-third-party, oopif-requests, oopif-scripts
run: xvfb-run --auto-servernum yarn test-bundle --fraggle-rock --shard=${{ matrix.smoke-test-shard }}/$SHARD_TOTAL --invert-match perf-diagnostics-third-party oopif-requests oopif-scripts

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

0 comments on commit 7ba8fc1

Please sign in to comment.