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
22 changes: 22 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Test-only environment variables.
#
# Loaded by test/integration/globalSetup.ts BEFORE the testcontainer Postgres
# is started. DATABASE_URL is intentionally NOT set here — globalSetup sets it
# dynamically to the container's connection URI.
#
# Everything in this file should be a non-secret stub. No real credentials.

# Copilot
COPILOT_API_KEY=test-copilot-api-key

# Xero OAuth app
XERO_CLIENT_ID=test-xero-client-id
XERO_CLIENT_SECRET=test-xero-client-secret
XERO_CALLBACK_URL=http://localhost:3000/api/auth/callback
XERO_SCOPES=openid profile email accounting.transactions accounting.contacts accounting.settings offline_access

# Cron
CRON_SECRET=test-cron-secret

# Vercel / Next
VERCEL_ENV=test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ yarn-error.log*

# env files (can opt-in for committing if needed)
.env*
# Non-secret stubs for integration tests — must be committed so the harness works on clone
!.env.test

# vercel
.vercel
Expand Down
3 changes: 2 additions & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ set -Eeuo pipefail

# Typecheck & lint the whole codebase before push - saves us from having to catch lint errors in CI
pnpm lint
pnpm build # This also does typechecking
pnpm typecheck:test # build typechecks src but excludes test/, so check the test project here
Comment thread
priosshrsth marked this conversation as resolved.
pnpm build # This also does typechecking
Comment thread
priosshrsth marked this conversation as resolved.
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@
"build:all": "sh scripts/build/build.sh",
"start": "next start",
"clean-start": "next build --turbopack && next start",
"typecheck": "tsc --noEmit",
"typecheck": "tsc --noEmit && pnpm typecheck:test",
"typecheck:test": "tsc --noEmit -p test/tsconfig.json",
"lint": "biome check",
"format": "biome format --write",
"lint-staged": "lint-staged",
"prepare": "husky",
"ex": "tsx --tsconfig tsconfig.tsx.json --require dotenv/config --require tsconfig-paths/register"
"ex": "tsx --tsconfig tsconfig.tsx.json --require dotenv/config --require tsconfig-paths/register",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage"
},
"dependencies": {
"@sentry/nextjs": "^10.29.0",
Expand Down Expand Up @@ -49,19 +53,23 @@
"@commitlint/types": "^19.8.1",
"@supabase/supabase-js": "^2.56.1",
"@tailwindcss/postcss": "^4",
"@testcontainers/postgresql": "^11.14.0",
"@types/node": "^20",
"@types/react": "19.2.7",
"@types/react-dom": "19.2.3",
"@types/react-linkify": "^1.0.4",
"@vitest/coverage-v8": "^4.1.9",
"drizzle-kit": "^0.31.4",
"husky": "^9.1.7",
"lint-staged": "^16.1.5",
"next-test-api-route-handler": "^5.0.5",
"server-only": "^0.0.1",
"supabase": "^2.39.2",
"tailwindcss": "^4",
"tsconfig-paths": "^4.2.0",
"tsx": "^4.20.5",
"typescript": "^5"
"typescript": "^5",
"vitest": "^4.1.9"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json,css}": [
Expand Down
Loading
Loading