Skip to content

fix(dashboard): minor follow-up fixes #57

fix(dashboard): minor follow-up fixes

fix(dashboard): minor follow-up fixes #57

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
lint-and-typecheck:
name: Lint and Type Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run ESLint
run: npm run lint
- name: Run TypeScript type check
run: npx tsc --noEmit
build:
name: Build Application
runs-on: ubuntu-latest
needs: lint-and-typecheck
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build Next.js app
run: npm run build
env:
# Required for Next.js build
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL || 'https://placeholder.supabase.co' }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY || 'placeholder-key' }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-output
path: .next
retention-days: 1
test:
name: Run Tests
runs-on: ubuntu-latest
needs: lint-and-typecheck
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test -- --ci
check-env-example:
name: Validate Environment Files
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check .env.example exists
run: |
if [ ! -f .env.example ]; then
echo "❌ .env.example file is missing!"
exit 1
fi
echo "✅ .env.example exists"
- name: Verify .env.local is not committed
run: |
if [ -f .env.local ]; then
echo "❌ .env.local should not be committed!"
exit 1
fi
echo "✅ .env.local is not in repository"