Skip to content

Lighthouse fixes

Lighthouse fixes #62

Workflow file for this run

name: Code Quality
on:
pull_request:
workflow_dispatch:
jobs:
lint-format:
name: Lint & Format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest
- name: Run Biome
run: biome ci .
performance-audit:
name: Performance Audit
runs-on: ubuntu-latest
env:
NEXT_TELEMETRY_DISABLED: true
NODE_ENV: "production"
DATABASE_HOST: "localhost"
DATABASE_PORT: "5432"
DATABASE_USER: "user"
DATABASE_PASSWORD: "password"
DATABASE_NAME: "database"
STORAGE_HOST: "localhost"
STORAGE_PORT: "9000"
STORAGE_USER: "user"
STORAGE_PASSWORD: "password"
STORAGE_NAME: "images"
FEIDE_CLIENT_ID: " "
FEIDE_CLIENT_SECRET: " "
FEIDE_AUTHORIZATION_ENDPOINT: "https://auth.dataporten.no/oauth/authorization"
FEIDE_TOKEN_ENDPOINT: "https://auth.dataporten.no/oauth/token"
FEIDE_USERINFO_ENDPOINT: "https://auth.dataporten.no/openid/userinfo"
NEXT_PUBLIC_SITE_URL: "http://localhost:3000"
LHCI_TOKEN: ${{ secrets.LHCI_BUILD_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 20
- name: Fetch base_ref HEAD to use it as Ancestor hash in LHCI
run: git fetch --depth=1 origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
- name: Setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install Dependencies
run: bun install --frozen-lockfile
- name: Build
run: bun run build
- name: Run Lighthouse
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
run: |
bun add -g @lhci/[email protected]
lhci autorun