Skip to content

Commit ed0a615

Browse files
committed
update load test
1 parent a6c152e commit ed0a615

File tree

5 files changed

+5
-2
lines changed

5 files changed

+5
-2
lines changed

.github/workflows/k6.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
- uses: superfly/flyctl-actions/setup-flyctl@master
1818

19-
- run: flyctl deploy --config apps/api/fly.toml --app hyprnote-api-loadtest --strategy immediate --wait-timeout 120
19+
- run: flyctl deploy --config apps/api/fly.toml --app hyprnote-api-loadtest --strategy immediate --wait-timeout 120 --env LOAD_TEST=true
2020
env:
2121
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
2222

apps/api/src/env.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const env = createEnv({
77
NODE_ENV: z
88
.enum(["development", "test", "production"])
99
.default("development"),
10+
LOAD_TEST: z.coerce.boolean().default(false),
1011
SUPABASE_URL: z.url(),
1112
SUPABASE_ANON_KEY: z.string().min(1),
1213
SUPABASE_SERVICE_ROLE_KEY: z.string().min(1),

apps/api/src/instrument.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ Sentry.init({
44
dsn: Bun.env.SENTRY_DSN,
55
release: `hyprnote-api@${Bun.env.APP_REVISION ?? "local"}`,
66
sampleRate: 1.0,
7+
enabled: ["true", "1"].includes(Bun.env.LOAD_TEST),
78
});

apps/api/src/posthog.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ import { env } from "./env";
44

55
export const posthog = new PostHog(env.POSTHOG_API_KEY, {
66
host: "https://us.i.posthog.com",
7+
disabled: env.LOAD_TEST,
78
});

supabase/.temp/cli-latest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2.62.10
1+
v2.65.5

0 commit comments

Comments
 (0)