From 196759c079040ff1bcc5cffc9844fa8261e6a5c8 Mon Sep 17 00:00:00 2001 From: Michael Brusegard <56915010+michaelbrusegard@users.noreply.github.com> Date: Fri, 20 Sep 2024 08:12:11 +0200 Subject: [PATCH] feat: create lighthouse config and github action --- .github/workflows/code-quality.yml | 38 ++++++++++++++++++++++++++++++ .github/workflows/lint.yml | 17 ------------- lighthouserc.yml | 6 +++++ 3 files changed, 44 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/code-quality.yml delete mode 100644 .github/workflows/lint.yml create mode 100644 lighthouserc.yml diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml new file mode 100644 index 0000000..5b95da3 --- /dev/null +++ b/.github/workflows/code-quality.yml @@ -0,0 +1,38 @@ +name: Code Quality + +on: + push: + 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 + steps: + - name: Checkout + uses: actions/checkout@v4 + - 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: Setup Lighthouse + run: bun add -g @lhci/cli@0.13.x + - name: Run Lighthouse + run: lhci autorun diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 435dc44..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Lint - -on: - push: - -jobs: - lint: - 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 . diff --git a/lighthouserc.yml b/lighthouserc.yml new file mode 100644 index 0000000..1f9e6ac --- /dev/null +++ b/lighthouserc.yml @@ -0,0 +1,6 @@ +ci: + collect: + url: ['http://localhost:3000/'] + startServerCommand: 'bun run start' + upload: + target: 'temporary-public-storage'