82 lines
1.7 KiB
YAML
82 lines
1.7 KiB
YAML
name: Frontend Quality
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "client/**"
|
|
- ".github/workflows/frontend-quality.yml"
|
|
pull_request:
|
|
paths:
|
|
- "client/**"
|
|
- ".github/workflows/frontend-quality.yml"
|
|
|
|
jobs:
|
|
eslint:
|
|
name: ESLint
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: client
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: "npm"
|
|
cache-dependency-path: client/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Run ESLint
|
|
run: npm run lint
|
|
|
|
prettier:
|
|
name: Prettier
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: client
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: "npm"
|
|
cache-dependency-path: client/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Check formatting
|
|
run: npx prettier --check .
|
|
|
|
typecheck:
|
|
name: Type Check
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: client
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: "npm"
|
|
cache-dependency-path: client/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Run TypeScript type check
|
|
run: npm run typecheck
|