From f4fef7bdb9c09fcf2e6ff35b536d770e2b29a63b Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Mon, 11 Apr 2022 16:51:05 +0200 Subject: [PATCH 1/2] Add Lighthouse CI Action --- .github/workflows/main.yml | 18 ++++++++++++++++++ budget.json | 15 +++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 budget.json diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..ac5cd5e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,18 @@ +name: Lighthouse CI +on: push +jobs: + lighthouse: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Audit URLs using Lighthouse + uses: treosh/lighthouse-ci-action@v9 + with: + urls: | + https://example.com/ + https://example.com/blog + budgetPath: ./budget.json # test performance budgets + uploadArtifacts: true # save results as an action artifacts + temporaryPublicStorage: true # upload lighthouse report to the temporary storage + + diff --git a/budget.json b/budget.json new file mode 100644 index 0000000..6506dcd --- /dev/null +++ b/budget.json @@ -0,0 +1,15 @@ +[ + { + "path": "/*", + "resourceSizes": [ + { + "resourceType": "document", + "budget": 18 + }, + { + "resourceType": "total", + "budget": 200 + } + ] + } +] From 16a368df5a219b1a518e132182ea98d6fcf718af Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Mon, 11 Apr 2022 17:07:15 +0200 Subject: [PATCH 2/2] Update production URL in Lighthouse Action --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ac5cd5e..7fac25d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,8 +9,7 @@ jobs: uses: treosh/lighthouse-ci-action@v9 with: urls: | - https://example.com/ - https://example.com/blog + https://talktometechnology.netlify.app/ budgetPath: ./budget.json # test performance budgets uploadArtifacts: true # save results as an action artifacts temporaryPublicStorage: true # upload lighthouse report to the temporary storage