Skip to content

Commit 690ae98

Browse files
authored
add lighthouse smoketests (windows) to CI (#265)
1 parent 279577f commit 690ae98

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

.github/workflows/lh-smoke.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: smoke
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request: # run on all PRs, not just PRs to a particular branch
7+
8+
jobs:
9+
# Only run smoke tests for windows against stable chrome.
10+
lh-smoke-windows:
11+
strategy:
12+
matrix:
13+
smoke-test-shard: [1, 2]
14+
# e.g. if set 1 fails, continue with set 2 anyway
15+
fail-fast: false
16+
runs-on: windows-latest
17+
name: Windows smoke ${{ matrix.smoke-test-shard }}/2
18+
19+
steps:
20+
- name: git clone
21+
uses: actions/checkout@v2
22+
23+
- name: Use Node.js 14.x
24+
uses: actions/setup-node@v1
25+
with:
26+
node-version: 14.x
27+
28+
# chrome-launcher
29+
# This'll add lighthouse AND install chrome-launcher's deps
30+
- run: yarn add --frozen-lockfile --network-timeout 1000000 -D https://github.com/GoogleChrome/lighthouse.git#master
31+
- run: yarn build
32+
33+
# lighthouse
34+
- run: yarn --cwd node_modules/lighthouse/ install --frozen-lockfile --network-timeout 1000000
35+
- run: yarn reset-link
36+
- run: yarn --cwd node_modules/lighthouse/ build-report
37+
38+
- name: Run smoke tests
39+
# Windows bots are slow, so only run enough tests to verify matching behavior.
40+
run: yarn --cwd node_modules/lighthouse/ smoke --debug -j=2 --retries=5 --shard=${{ matrix.smoke-test-shard }}/2 dbw oopif offline lantern metrics
41+
42+
- name: Upload failures
43+
if: failure()
44+
uses: actions/upload-artifact@v1
45+
with:
46+
name: Smokehouse (windows)
47+
path: node_modules/lighthouse/.tmp/smokehouse-ci-failures/

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"test-formatting": "test/check-formatting.sh",
1212
"format": "scripts/format.sh",
1313
"type-check": "tsc --allowJs --checkJs --noEmit --target es2019 *.js",
14-
"prepublishOnly": "npm run build && npm run test"
14+
"prepublishOnly": "npm run build && npm run test",
15+
"reset-link": "(yarn unlink || true) && yarn link && yarn --cwd node_modules/lighthouse/ link chrome-launcher"
1516
},
1617
"bin": {
1718
"print-chrome-path": "bin/print-chrome-path.js"

0 commit comments

Comments
 (0)