Skip to content

Commit fcd5ee9

Browse files
committed
ci: stabilize cli tests env and add e2e push trigger
1 parent 3b61c7f commit fcd5ee9

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,14 @@ jobs:
162162
echo "No regular tests found in .agents"
163163
fi
164164
elif [ "${{ matrix.package }}" = "cli" ]; then
165+
export NEXT_PUBLIC_CB_ENVIRONMENT=${NEXT_PUBLIC_CB_ENVIRONMENT:-test}
166+
export NEXT_PUBLIC_CODEBUFF_APP_URL=${NEXT_PUBLIC_CODEBUFF_APP_URL:-https://example.com}
167+
export NEXT_PUBLIC_SUPPORT_EMAIL=${NEXT_PUBLIC_SUPPORT_EMAIL:-support@example.com}
168+
export NEXT_PUBLIC_POSTHOG_API_KEY=${NEXT_PUBLIC_POSTHOG_API_KEY:-test}
169+
export NEXT_PUBLIC_POSTHOG_HOST_URL=${NEXT_PUBLIC_POSTHOG_HOST_URL:-https://app.posthog.com}
170+
export NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=${NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY:-pk_test_dummy}
171+
export NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL=${NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL:-https://example.com/portal}
172+
export NEXT_PUBLIC_WEB_PORT=${NEXT_PUBLIC_WEB_PORT:-3000}
165173
UNIT_TESTS=$(find src -name '*.test.ts' ! -path '*/__tests__/integration/*' ! -path '*/__tests__/e2e/*' | sort)
166174
if [ -n "$UNIT_TESTS" ]; then
167175
echo "$UNIT_TESTS" | xargs -I {} bun test --timeout=180000 {}

.github/workflows/cli-e2e-scheduled.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@ name: CLI E2E Scheduled
22

33
on:
44
workflow_dispatch:
5+
push:
6+
branches: ['**']
7+
paths:
8+
- 'cli/**'
9+
- 'common/**'
10+
- 'packages/**'
11+
- 'package.json'
12+
- 'bun.lock'
13+
- '.github/workflows/cli-e2e-scheduled.yml'
514
schedule:
615
# 5am PT (13:00 UTC standard time)
716
- cron: '0 13 * * *'
817

918
jobs:
1019
cli-e2e:
11-
if: github.ref == 'refs/heads/main'
1220
runs-on: ubuntu-latest
1321
steps:
1422
- name: Checkout repository

0 commit comments

Comments
 (0)