diff --git a/.github/workflows/ci-cli.yaml b/.github/workflows/ci-cli.yaml index 8084846129..dcb943f883 100644 --- a/.github/workflows/ci-cli.yaml +++ b/.github/workflows/ci-cli.yaml @@ -78,14 +78,19 @@ jobs: fetch-depth: 0 - name: Install dependencies uses: ./.github/workflows/actions/yarn-install + - name: Server / Append billing config to .env.test + working-directory: packages/twenty-server + run: | + echo "IS_BILLING_ENABLED=true" >> .env.test + echo "BILLING_STRIPE_API_KEY=test-api-key" >> .env.test + echo "BILLING_STRIPE_BASE_PLAN_PRODUCT_ID=test-base-plan-product-id" >> .env.test + echo "BILLING_STRIPE_WEBHOOK_SECRET=test-webhook-secret" >> .env.test + echo "BILLING_PLAN_REQUIRED_LINK=http://localhost:3001/stripe-redirection" >> .env.test - name: Server / Create Test DB run: | PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres -d postgres -c 'CREATE DATABASE "test";' - name: CLI / Run E2E Tests - uses: ./.github/workflows/actions/nx-affected - with: - tag: scope:cli - tasks: 'test:e2e' + run: npx nx test:e2e twenty-cli ci-cli-status-check: if: always() && !cancelled() timeout-minutes: 5 diff --git a/packages/twenty-cli/project.json b/packages/twenty-cli/project.json index 065bbb0502..d8fce929b9 100644 --- a/packages/twenty-cli/project.json +++ b/packages/twenty-cli/project.json @@ -80,15 +80,11 @@ "options": { "cwd": "packages/twenty-cli", "commands": [ - "npx wait-on http://localhost:3000/healthz --timeout 600000 --interval 1000 --verbose && NODE_ENV=test npx jest --config ./jest.e2e.config.ts" + "npx wait-on http://localhost:3000/healthz --timeout 600000 --interval 1000 --log && NODE_ENV=test npx jest --config ./jest.e2e.config.ts" ] }, "parallel": false, "dependsOn": [ - { - "target": "build", - "projects": "dependencies" - }, { "target": "database:reset", "projects": "twenty-server" diff --git a/packages/twenty-server/project.json b/packages/twenty-server/project.json index 6a1d3ae77c..9d7e4e21b9 100644 --- a/packages/twenty-server/project.json +++ b/packages/twenty-server/project.json @@ -59,9 +59,10 @@ }, "start:ci-if-needed": { "executor": "nx:run-commands", + "dependsOn": ["build"], "options": { "cwd": "packages/twenty-server", - "command": "curl -f -s http://localhost:3000/healthz > /dev/null 2>&1 && echo '✅ Server already running' || (echo '🚀 Server not running, starting...' && NODE_ENV=development nohup nest start > server.log 2>&1 &)" + "command": "curl -f -s http://localhost:3000/healthz > /dev/null 2>&1 && echo '✅ Server already running' || (echo '🚀 Server not running, starting...' && nohup nest start > server.log 2>&1 &)" } }, "start:debug": {