Skip to content

Commit

Permalink
feat(ci): enable lighthouse audits in PR
Browse files Browse the repository at this point in the history
  • Loading branch information
teomrd committed Nov 13, 2024
1 parent 6b4e294 commit 27a610a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
19 changes: 19 additions & 0 deletions .github/actions/lighthouse-audit/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lighthouse Audit checks
description: Checks for Performance Accessibility, Best Practices & SEO from Google Lighthouse project
runs:
using: composite
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Lighthouse
shell: bash
run: |
npm install -g @lhci/cli@0.14.x
- name: Run Lighthouse audit
shell: bash
run: |
lhci autorun
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
24 changes: 0 additions & 24 deletions .github/workflows/lighhouse.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ on:
jobs:
quality-checks:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- run: make checks
- run: make build
- name: Lighthouse audits
uses: ./.github/actions/lighthouse-audit
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ MAKE_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

.DEFAULT_GOAL := dev

.PHONY : install dev audits deploy serve build deploy clean
.PHONY : install dev deploy serve build deploy clean

install:
deno install
Expand All @@ -22,11 +22,11 @@ test:
compile:
deno task compile

checks: install verify-formatting lint test
checks: install build verify-formatting lint test
make compile

audits: install build
deno task lighthouse
lighthouse-audit: install build
lhci autorun

clean:
deno clean
Expand Down

0 comments on commit 27a610a

Please sign in to comment.