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
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ jobs:
NEXT_PUBLIC_DASHBOARD_URL=http://localhost:3002
NEXT_PUBLIC_TENANT_URL=http://localhost:3003
NEXT_PUBLIC_ADMIN_URL=http://localhost:3004
# Placeholder R2 credentials. `upload.ts` and the tenant-document
# storage build an aws4fetch AwsClient at module scope, so importing
# them requires these to be present even though tests make no calls.
CLOUDFLARE_ACCOUNT_ID=test-account-id
R2_BUCKET_NAME=keyhq-test
R2_ACCESS_KEY_ID=test-access-key-id
R2_SECRET_ACCESS_KEY=test-secret-access-key
R2_PUBLIC_URL=https://test-r2.example.com
R2_S3_ENDPOINT=https://test-account.r2.cloudflarestorage.com
R2_PRIVATE_BUCKET_NAME=keyhq-private-documents-test
R2_PRIVATE_ACCESS_KEY_ID=test-private-access-key-id
R2_PRIVATE_SECRET_ACCESS_KEY=test-private-secret-access-key
EOF

- name: Schema drift check
Expand Down
13 changes: 13 additions & 0 deletions apps/server/.env.test.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,16 @@ NEXT_PUBLIC_WEB_URL=http://localhost:3001
NEXT_PUBLIC_DASHBOARD_URL=http://localhost:3002
NEXT_PUBLIC_TENANT_URL=http://localhost:3003
NEXT_PUBLIC_ADMIN_URL=http://localhost:3004

# Placeholder R2 credentials. upload.ts and the tenant-document storage
# construct an aws4fetch AwsClient at module scope, so importing them requires
# these to be present even though the test suite makes no storage calls.
CLOUDFLARE_ACCOUNT_ID=test-account-id
R2_BUCKET_NAME=keyhq-test
R2_ACCESS_KEY_ID=test-access-key-id
R2_SECRET_ACCESS_KEY=test-secret-access-key
R2_PUBLIC_URL=https://test-r2.example.com
R2_S3_ENDPOINT=https://test-account.r2.cloudflarestorage.com
R2_PRIVATE_BUCKET_NAME=keyhq-private-documents-test
R2_PRIVATE_ACCESS_KEY_ID=test-private-access-key-id
R2_PRIVATE_SECRET_ACCESS_KEY=test-private-secret-access-key
12 changes: 12 additions & 0 deletions packages/db/src/bootstrap-local.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ const EXPECTED_TEST_ENV: Record<string, string> = {
NEXT_PUBLIC_DASHBOARD_URL: "http://localhost:3002",
NEXT_PUBLIC_TENANT_URL: "http://localhost:3003",
NEXT_PUBLIC_ADMIN_URL: "http://localhost:3004",
// Placeholder R2 credentials: upload.ts and the tenant-document storage
// build an aws4fetch AwsClient at module scope, so importing them in tests
// requires the vars to be present. Tests never call storage.
CLOUDFLARE_ACCOUNT_ID: "test-account-id",
R2_BUCKET_NAME: "keyhq-test",
R2_ACCESS_KEY_ID: "test-access-key-id",
R2_SECRET_ACCESS_KEY: "test-secret-access-key",
R2_PUBLIC_URL: "https://test-r2.example.com",
R2_S3_ENDPOINT: "https://test-account.r2.cloudflarestorage.com",
R2_PRIVATE_BUCKET_NAME: "keyhq-private-documents-test",
R2_PRIVATE_ACCESS_KEY_ID: "test-private-access-key-id",
R2_PRIVATE_SECRET_ACCESS_KEY: "test-private-secret-access-key",
};

function parseEnv(text: string): Record<string, string> {
Expand Down
Loading