Move UI linting to separate file

This commit is contained in:
Adam Shiervani 2025-03-25 10:31:19 +01:00
parent d725bd0aad
commit 396f7f348d
2 changed files with 36 additions and 21 deletions

View File

@ -9,27 +9,6 @@ on:
types: [submitted] types: [submitted]
jobs: jobs:
frontend-lint:
runs-on: buildjet-4vcpu-ubuntu-2204
name: Lint
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: v21.1.0
cache: "npm"
cache-dependency-path: "ui/package-lock.json"
- name: Install dependencies
run: |
cd ui
npm ci
- name: Lint frontend
run: |
cd ui
npm run lint
build: build:
runs-on: buildjet-4vcpu-ubuntu-2204 runs-on: buildjet-4vcpu-ubuntu-2204
name: Build name: Build

36
.github/workflows/ui-lint.yml vendored Normal file
View File

@ -0,0 +1,36 @@
---
name: frontend-lint
on:
push:
paths:
- "ui/**"
- "package.json"
- "package-lock.json"
- ".github/workflows/frontend-lint.yml"
- ".eslintrc*"
pull_request:
permissions:
contents: read
jobs:
ui-lint:
name: UI Lint
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: v21.1.0
cache: "npm"
cache-dependency-path: "ui/package-lock.json"
- name: Install dependencies
run: |
cd ui
npm ci
- name: Lint UI
run: |
cd ui
npm run lint