Skip to content

Commit

Permalink
add lighthouse smoketests (windows) to CI (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish authored May 31, 2022
1 parent 279577f commit 690ae98
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/lh-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: smoke

on:
push:
branches: [master]
pull_request: # run on all PRs, not just PRs to a particular branch

jobs:
# Only run smoke tests for windows against stable chrome.
lh-smoke-windows:
strategy:
matrix:
smoke-test-shard: [1, 2]
# e.g. if set 1 fails, continue with set 2 anyway
fail-fast: false
runs-on: windows-latest
name: Windows smoke ${{ matrix.smoke-test-shard }}/2

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

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

# chrome-launcher
# This'll add lighthouse AND install chrome-launcher's deps
- run: yarn add --frozen-lockfile --network-timeout 1000000 -D https://github.com/GoogleChrome/lighthouse.git#master
- run: yarn build

# lighthouse
- run: yarn --cwd node_modules/lighthouse/ install --frozen-lockfile --network-timeout 1000000
- run: yarn reset-link
- run: yarn --cwd node_modules/lighthouse/ build-report

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

- name: Upload failures
if: failure()
uses: actions/upload-artifact@v1
with:
name: Smokehouse (windows)
path: node_modules/lighthouse/.tmp/smokehouse-ci-failures/
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"test-formatting": "test/check-formatting.sh",
"format": "scripts/format.sh",
"type-check": "tsc --allowJs --checkJs --noEmit --target es2019 *.js",
"prepublishOnly": "npm run build && npm run test"
"prepublishOnly": "npm run build && npm run test",
"reset-link": "(yarn unlink || true) && yarn link && yarn --cwd node_modules/lighthouse/ link chrome-launcher"
},
"bin": {
"print-chrome-path": "bin/print-chrome-path.js"
Expand Down

0 comments on commit 690ae98

Please sign in to comment.