Open ediamin opened 2 years ago
Merging #22 (04789b4) into main (f01a864) will increase coverage by
1.84%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## main #22 +/- ##
============================================
+ Coverage 61.25% 63.09% +1.84%
+ Complexity 340 338 -2
============================================
Files 50 50
Lines 831 794 -37
============================================
- Hits 509 501 -8
+ Misses 322 293 -29
Flag | Coverage Δ | |
---|---|---|
php | 63.09% <ø> (+1.84%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
src/PageSpeed/PageSpeedInsightsApi.php | 70.00% <0.00%> (-2.73%) |
:arrow_down: |
src/Cli/Command/Optimize.php | 89.47% <0.00%> (-1.84%) |
:arrow_down: |
src/Cli/Command/Analyze.php | 0.00% <0.00%> (ø) |
|
src/Cli/Command/PageSpeedInsights.php | 0.00% <0.00%> (ø) |
|
src/Engine/Exception/InvalidJsonFile.php | 100.00% <0.00%> (ø) |
|
src/Engine/ToolStack/ParallelToolStack.php | 0.00% <0.00%> (ø) |
|
src/Engine/Exception/FailedToProcessTimestamp.php | 100.00% <0.00%> (ø) |
|
src/Engine/StringStream.php | 10.00% <0.00%> (+0.24%) |
:arrow_up: |
src/Engine/Context.php | 25.00% <0.00%> (+2.77%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f01a864...04789b4. Read the comment docs.
Updated the generate-fixture
script to check the lighthouseVersion
change. Now the fixture file will only update if lighthouseVersion
are different in the API data and in the existing psi_local-wp_amp-page.json
in the project.
@ediamin That looks pretty good so far. How many audits are we triggering so far with the current site setup?
@schlessera I've added a testing plugin which will simulate bad audit scores for the following,
cumulative-layout-shift
largest-contentful-paint
first-contentful-paint
speed-index
unminified-javascript
unminified-css
uses-rel-preconnect
in addition to these, I've found that overall performance stays under 60 in multiple tests.
Fixes #6
Currently we have only one single fixture file for the
https:\\amp-wp.org
page. The goal of this PR is to add more fixture files so we can use them with--url
flag.This PR introduces two new binaries,
generate-fixture
: This will spin up a WP site to test against PageSpeed Insights API. It'll create/update a fixture filepsi_local-wp_amp-page.json
file intests/fixtures
directory.stop-server
: It cleans up/destroys everything that setup bygenerate-fixture
. This is helpful when we work in our local.Prerequisite:
To make the action workable in GitHub, we need to setup two secrets:
PSI_API_KEY
: The PageSpeed Insights API key,NGROK_AUTH_TOKEN
: ngrok auth token that can be found in ngrok dashboard.To work in local
.env
file that can be generated from the.env.example
file.To-dos:
tests/fixtures
folder, using the URL and the versions of both PSI API and the embedded Lighthouse audit.ref: https://github.com/ampproject/px-toolbox-php/issues/6#issuecomment-1029498802