From 18b365c2e16fae9d9bf8e8b609f63ddaf8ee0caf Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 4 May 2022 17:18:12 +0300 Subject: [PATCH 1/3] misc: adjust Lighthouse CI --- .github/workflows/lighthouse-report.yml | 2 +- .github/workflows/scripts/format-lighthouse-score.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lighthouse-report.yml b/.github/workflows/lighthouse-report.yml index 41fd2dc71565..97bb2901a4ad 100644 --- a/.github/workflows/lighthouse-report.yml +++ b/.github/workflows/lighthouse-report.yml @@ -28,7 +28,7 @@ jobs: with: urls: | https://deploy-preview-$PR_NUMBER--docusaurus-2.netlify.app/ - https://deploy-preview-$PR_NUMBER--docusaurus-2.netlify.app/docs/ + https://deploy-preview-$PR_NUMBER--docusaurus-2.netlify.app/docs/installation configPath: ./.github/workflows/lighthouserc.json uploadArtifacts: true temporaryPublicStorage: true diff --git a/.github/workflows/scripts/format-lighthouse-score.js b/.github/workflows/scripts/format-lighthouse-score.js index 99ece0294c45..f3b412b32fb1 100644 --- a/.github/workflows/scripts/format-lighthouse-score.js +++ b/.github/workflows/scripts/format-lighthouse-score.js @@ -20,7 +20,7 @@ const createMarkdownTableRow = ({ const createSingleRow = ({summary, testUrl, reportPublicUrl}) => { const normalizedBody = { - url: testUrl, + url: new URL(testUrl).pathname, performance: scoreEntry(summary.performance), accessibility: scoreEntry(summary.accessibility), bestPractices: scoreEntry(summary['best-practices']), From 5a2ab851c5b97c74cd406d66288d38942698ef6a Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 4 May 2022 17:36:54 +0300 Subject: [PATCH 2/3] Use MD link --- .github/workflows/scripts/format-lighthouse-score.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/format-lighthouse-score.js b/.github/workflows/scripts/format-lighthouse-score.js index f3b412b32fb1..6ba64c25beec 100644 --- a/.github/workflows/scripts/format-lighthouse-score.js +++ b/.github/workflows/scripts/format-lighthouse-score.js @@ -15,12 +15,12 @@ const createMarkdownTableRow = ({ pwa, reportUrl, }) => { - return `| ${url} | ${performance} | ${accessibility} | ${bestPractices} | ${seo} | ${pwa} | [View report](${reportUrl})|`; + return `| [${new URL(testUrl).pathname}](${url}) | ${performance} | ${accessibility} | ${bestPractices} | ${seo} | ${pwa} | [View report](${reportUrl})|`; }; const createSingleRow = ({summary, testUrl, reportPublicUrl}) => { const normalizedBody = { - url: new URL(testUrl).pathname, + url: testUrl, performance: scoreEntry(summary.performance), accessibility: scoreEntry(summary.accessibility), bestPractices: scoreEntry(summary['best-practices']), From b8523ec11ac32b5dc96e1d9cdd44df29188da36a Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 4 May 2022 17:38:33 +0300 Subject: [PATCH 3/3] Format code --- .github/workflows/scripts/format-lighthouse-score.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/scripts/format-lighthouse-score.js b/.github/workflows/scripts/format-lighthouse-score.js index 6ba64c25beec..29d90976f73d 100644 --- a/.github/workflows/scripts/format-lighthouse-score.js +++ b/.github/workflows/scripts/format-lighthouse-score.js @@ -15,7 +15,9 @@ const createMarkdownTableRow = ({ pwa, reportUrl, }) => { - return `| [${new URL(testUrl).pathname}](${url}) | ${performance} | ${accessibility} | ${bestPractices} | ${seo} | ${pwa} | [View report](${reportUrl})|`; + return `| [${ + new URL(url).pathname + }](${url}) | ${performance} | ${accessibility} | ${bestPractices} | ${seo} | ${pwa} | [View report](${reportUrl})|`; }; const createSingleRow = ({summary, testUrl, reportPublicUrl}) => {