Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
{
"extends": [
"next/core-web-vitals",
"next/typescript"
"next/typescript",
"plugin:jsx-a11y/recommended"
],
"plugins": ["jsx-a11y"],
"rules": {
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/click-events-have-key-events": "warn",
"jsx-a11y/no-static-element-interactions": "warn"
},
"overrides": [
{
"files": [
"components/map-preview.tsx",
"components/dimension-mapping.tsx",
"components/ui/sidebar.tsx"
],
"rules": {
"@typescript-eslint/ban-ts-comment": "off"
}
}
]
}
100 changes: 100 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: CI

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

jobs:
lint-and-typecheck:
name: Lint and Type Check
runs-on: ubuntu-latest

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

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
continue-on-error: false
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Lint
run: pnpm lint

- name: Type Check
run: pnpm type-check

accessibility:
name: Accessibility Tests
runs-on: ubuntu-latest

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

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
continue-on-error: false
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Install Playwright browsers
run: pnpm exec playwright install --with-deps chromium

- name: Run accessibility tests
run: pnpm test:a11y
env:
PLAYWRIGHT_TEST_BASE_URL: http://localhost:3000

bundle-size:
name: Bundle Size Check
runs-on: ubuntu-latest

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

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
continue-on-error: false
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Build application
run: pnpm build

- name: Check bundle sizes
run: pnpm check:bundle
77 changes: 77 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Lighthouse CI

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: read
pull-requests: write

jobs:
lighthouse:
name: Lighthouse Performance Audit
runs-on: ubuntu-latest

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

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
continue-on-error: false
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Build application
run: pnpm build

- name: Start server
run: pnpm start &
env:
PORT: 3000

- name: Wait for server
run: |
timeout=60
elapsed=0
while ! curl -f http://localhost:3000 > /dev/null 2>&1; do
if [ $elapsed -ge $timeout ]; then
echo "Server failed to start within $timeout seconds"
exit 1
fi
sleep 2
elapsed=$((elapsed + 2))
done
echo "Server is ready"

- name: Run Lighthouse CI
uses: treosh/lighthouse-ci-action@v11
with:
urls: |
http://localhost:3000/
http://localhost:3000/landing
uploadArtifacts: true
temporaryPublicStorage: true
configPath: ./.lighthouserc.json

- name: Check Lighthouse scores
run: |
# Extract scores from Lighthouse CI output
# This is a simplified check - in production, use lighthouse-ci's built-in assertions
echo "Lighthouse audit completed. Check the artifacts for detailed reports."

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

# playwright
/test-results/
/playwright-report/
/playwright/.cache/
25 changes: 25 additions & 0 deletions .lighthouserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"ci": {
"collect": {
"numberOfRuns": 3,
"startServerCommand": "pnpm start",
"url": ["http://localhost:3000/", "http://localhost:3000/landing"]
},
"assert": {
"assertions": {
"categories:performance": ["error", { "minScore": 0.75 }],
"categories:accessibility": ["error", { "minScore": 0.90 }],
"categories:best-practices": ["error", { "minScore": 0.90 }],
"categories:seo": ["error", { "minScore": 0.85 }],
"first-contentful-paint": ["error", { "maxNumericValue": 3000 }],
"largest-contentful-paint": ["error", { "maxNumericValue": 6000 }],
"total-blocking-time": ["error", { "maxNumericValue": 600 }],
"cumulative-layout-shift": ["error", { "maxNumericValue": 0.15 }]
}
},
"upload": {
"target": "temporary-public-storage"
}
}
}

3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Skip postinstall scripts by default to avoid failures
# CI will use --ignore-scripts flag explicitly
enable-pre-post-scripts=false
Loading