front-end icon indicating copy to clipboard operation
front-end copied to clipboard

added google's Lighthouse CI check

Open BhuwanChandra opened this issue 5 years ago • 11 comments
trafficstars

Description of changes

added lighthouse ci check to get a measurement on the performance of website.

Issue Resolved

Fixes #1230

BhuwanChandra avatar Oct 06 '20 11:10 BhuwanChandra

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

storybook – ./

🔍 Inspect: https://vercel.com/operation-code/storybook/p4gavenvr
✅ Preview: https://storybook-git-lighthouse-ci.operation-code.vercel.app

operation-code – ./

🔍 Inspect: https://vercel.com/operation-code/operation-code/iphj0jsdq
✅ Preview: https://operation-code-git-lighthouse-ci.operation-code.now.sh

vercel[bot] avatar Oct 06 '20 11:10 vercel[bot]



Test summary

80 0 0 0Flakiness 1


Run details

Project operation_code
Status Passed
Commit 173e8e0494
Started Oct 30, 2020 10:11 PM
Ended Oct 30, 2020 10:14 PM
Duration 02:27 💡
OS Linux Debian - 10.5
Browser Electron 83

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/join.spec.js Flakiness
1 join > should NOT be able to register when zipcode contains only spaces

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

cypress[bot] avatar Oct 06 '20 11:10 cypress[bot]

I see

No GitHub token set, skipping GitHub status check.

in the workflow spot.

Screen Shot 2020-10-08 at 9 20 13 AM

Do we need to do something about that?

Additionally, I'm still not sure what to expect from this check. What would make it fail?

kylemh avatar Oct 08 '20 16:10 kylemh

A status check, if configured, is a message that appears on every PR and typically includes information such as the results of a test or the success of a build.

You need to set lighthouse github app in this repository to get the status checks and performance scores on every pull requests. Capture something like this.

to set github status check:

  1. go to https://github.com/apps/lighthouse-ci
  2. add lighthouse CI to this repository
  3. add LHCI_GITHUB_APP_TOKEN to the secrets of the repository.

Or we can also add a bot to comment lighthouse scores on each PR.

this is totally optional, otherwise we need to go to the details each time to check the performance scores.

basically in these checks, we can run our lighthouse checks against some predefined performance scores (we need add them into our lighthouserc.js file) and if the current scores are below those predefined scores then this check will get failed.

currently I haven't defined any scores yet, If you want me add the scores let me know I will add some performance scores.

and also let me know if you have enabled the github status check then I need to make some changes in lighthouse.yaml file in order to make it work.

BhuwanChandra avatar Oct 10 '20 04:10 BhuwanChandra

Awesome. Added the token: LHCI_GITHUB_APP_TOKEN to GitHub. Updated your branch! Let's see if it works 🌟

kylemh avatar Oct 10 '20 16:10 kylemh

I have made the required changes but still it is showing No GitHub token set, skipping GitHub status check this, can you check once if LHCI_GITHUB_APP_TOKEN is in the secrets of the repository or not? I have added some minimum scores for each checks and now the checks will get failed if the performance scores are below those scores.

BhuwanChandra avatar Oct 11 '20 05:10 BhuwanChandra

@BhuwanChandra I think it was an annoying typo issue. The actual GitHub app refers to the would-be token as: LHCI_GITHUB_APP_TOKEN, but this workflow expects LHCI_GITHUB_TOKEN 🙃 https://github.com/treosh/lighthouse-ci-action/issues/60#issuecomment-684040439

kylemh avatar Oct 15 '20 00:10 kylemh

Hmmmm, not sure what else could be going on.

I have the token added via secrets under both monikers - just in case:

Screen Shot 2020-10-14 at 5 44 06 PM

I've had them in since you began working on this - ignore the time stamp - I just moved them to the org level instead of just this repository.

kylemh avatar Oct 15 '20 00:10 kylemh

Do you want to try this one out https://github.com/OskarAhl/Lighthouse-github-action-comment/blob/main/.github/workflows/lighthouse-on-vercel-preview-url.yml

kylemh avatar Oct 18 '20 19:10 kylemh

Ok, I will try this one!

BhuwanChandra avatar Oct 19 '20 15:10 BhuwanChandra

Code Climate has analyzed commit 173e8e04 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (90% is the threshold).

This pull request will bring the total coverage in the repository to 83.9% (0.0% change).

View more on Code Climate.

qlty-cloud-legacy[bot] avatar Oct 30 '20 22:10 qlty-cloud-legacy[bot]