Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update smokehouse audit/gathere config to speedup lighthouse #2732

Merged
merged 4 commits into from
Aug 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions lighthouse-cli/test/smokehouse/byte-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* @license Copyright 2017 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
'use strict';

/**
* Config file for running PWA smokehouse audits.
*/
module.exports = {
extends: 'lighthouse:default',
settings: {
onlyAudits: [
'offscreen-images',
'uses-webp-images',
'uses-optimized-images',
'uses-responsive-images',
]
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ node lighthouse-cli/test/fixtures/static-server.js &

sleep 0.5s

config="lighthouse-core/config/default.js"
config="lighthouse-cli/test/smokehouse/byte-config.js"
expectations="lighthouse-cli/test/smokehouse/byte-efficiency/expectations.js"

yarn smokehouse -- --config-path=$config --expectations-path=$expectations
Expand Down
23 changes: 23 additions & 0 deletions lighthouse-cli/test/smokehouse/dbw-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* @license Copyright 2017 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
'use strict';

/**
* Config file for running PWA smokehouse audits.
*/
module.exports = {
extends: 'lighthouse:default',
settings: {
onlyCategories: [
'best-practices'
],
onlyAudits: [
'dom-size',
'link-blocking-first-paint',
'script-blocking-first-paint',
]
}
};
2 changes: 1 addition & 1 deletion lighthouse-cli/test/smokehouse/dobetterweb/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ node lighthouse-cli/test/fixtures/static-server.js &

sleep 0.5s

config="lighthouse-core/config/default.js"
config="lighthouse-cli/test/smokehouse/dbw-config.js"
expectations="lighthouse-cli/test/smokehouse/dobetterweb/dbw-expectations.js"

# run smoketest on DBW test page.
Expand Down
35 changes: 35 additions & 0 deletions lighthouse-cli/test/smokehouse/offline-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* @license Copyright 2017 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
'use strict';

/**
* Config file for running PWA smokehouse audits.
*/
module.exports = {
extends: 'lighthouse:default',
settings: {
onlyAudits: [
'is-on-https',
'redirects-http',
'service-worker',
'works-offline',
'viewport',
'without-javascript',
'user-timings',
'critical-request-chains',
'webapp-install-banner',
'splash-screen',
'themed-omnibox',
'aria-valid-attr',
'aria-allowed-attr',
'color-contrast',
'image-alt',
'label',
'tabindex',
'content-width',
]
}
};
2 changes: 1 addition & 1 deletion lighthouse-cli/test/smokehouse/offline-local/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ node lighthouse-cli/test/fixtures/static-server.js &

sleep 0.5s

config="lighthouse-core/config/default.js"
config="lighthouse-cli/test/smokehouse/offline-config.js"
expectations="lighthouse-cli/test/smokehouse/offline-local/offline-expectations.js"

# run smoketest, expecting results found in offline-expectations
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-cli/test/smokehouse/tricky-ttci/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ node lighthouse-cli/test/fixtures/static-server.js &

sleep 0.5s

config="lighthouse-core/config/perf.json"
config="lighthouse-core/config/default.js"
expectations="lighthouse-cli/test/smokehouse/tricky-ttci/expectations.js"

yarn smokehouse -- --config-path=$config --expectations-path=$expectations
Expand Down