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
48 changes: 48 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: PR Checks

on:
pull_request:
branches: [main]
push:
branches: [main]

concurrency:
group: pr-checks-${{ github.ref }}
cancel-in-progress: true

jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Generate Prisma client
run: npx prisma generate

- name: Lint
run: npm run lint
continue-on-error: true

- name: Type check
run: npx tsc --noEmit
continue-on-error: true

- name: Test
run: npm run test:ci
continue-on-error: true

- name: Build
run: npm run build
env:
SKIP_ENV_VALIDATION: 'true'
continue-on-error: true
18 changes: 18 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,24 @@ const config = {

// External packages for server components to avoid bundling issues
serverExternalPackages: ["@fabianbormann/cardano-peer-connect"],

// Basic security headers applied to all routes.
// NOTE: Content-Security-Policy and Strict-Transport-Security are intentionally
// omitted — CSP would break inline scripts/styles and HSTS locks browsers to
// HTTPS for max-age and should only be enabled after team review.
async headers() {
return [
{
source: '/:path*',
headers: [
{ key: 'X-Frame-Options', value: 'SAMEORIGIN' },
{ key: 'X-Content-Type-Options', value: 'nosniff' },
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
{ key: 'Permissions-Policy', value: 'camera=(), microphone=(), geolocation=()' },
],
},
];
},
};

// Bundle analyzer - only enable when ANALYZE env var is set
Expand Down
Loading
Loading