Skip to content
Merged
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: PR Checks

on:
pull_request:
branches: [ main ]

jobs:
quality-checks:
runs-on: ubuntu-latest

# Run all commands inside the frontend directory
defaults:
run:
working-directory: ./frontend

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: ./frontend/package-lock.json

- name: Install dependencies
run: npm ci

- name: Run ESLint
# Uses the "lint": "eslint" script from your package.json
run: npm run lint

- name: Check TypeScript Types
# Uses npx to run the TypeScript compiler and check for errors without generating files
run: npx tsc --noEmit

- name: Verify Next.js Build
# Uses the "build": "next build" script
# Next.js will also do a strict check here, but having them separate makes debugging easier!
run: npm run build
Loading