diff --git a/.devcontainer/base/docker-compose.yaml b/.devcontainer/base/docker-compose.yaml index 3e14f9b8e6..0941f54fc0 100644 --- a/.devcontainer/base/docker-compose.yaml +++ b/.devcontainer/base/docker-compose.yaml @@ -12,7 +12,8 @@ services: environment: ZITADEL_DATABASE_POSTGRES_HOST: db ZITADEL_EXTERNALSECURE: false - + DISPLAY: ' ' + db: container_name: db image: postgres:17.0-alpine3.19 diff --git a/.devcontainer/login-integration-ci/devcontainer.json b/.devcontainer/login-integration-ci/devcontainer.json index cd18a7a035..fe6804790c 100644 --- a/.devcontainer/login-integration-ci/devcontainer.json +++ b/.devcontainer/login-integration-ci/devcontainer.json @@ -15,6 +15,6 @@ 22222, 3001 ], - "onCreateCommand": "pnpm --filter @zitadel/login install --frozen-lockfile; pnpm --filter @zitadel/login exec cypress install", + "onCreateCommand": "pnpm --filter @zitadel/login install --frozen-lockfile --dev; pnpm --filter @zitadel/login exec cypress install", "updateContentCommand": "pnpm --filter @zitadel/login test:integration:login" } \ No newline at end of file diff --git a/.devcontainer/login-integration-debug/devcontainer.json b/.devcontainer/login-integration-debug/devcontainer.json index 371e59563b..fab5e37f34 100644 --- a/.devcontainer/login-integration-debug/devcontainer.json +++ b/.devcontainer/login-integration-debug/devcontainer.json @@ -10,15 +10,13 @@ "runServices": [ "login-integration" ], - "workspaceFolder": "/workspaces", + "workspaceFolder": "/workspaces/apps/login", "forwardPorts": [ 22220, 22222, 3001 ], - "onCreateCommand": "pnpm install --filter . --filter @zitadel/login; cd apps/login; pnpm cypress install", - "postAttachCommand": "pnpm turbo daemon clean || true; pnpm turbo watch @zitadel/login#dev test:integration:login", - "features": { - "ghcr.io/devcontainers/features/docker-outside-of-docker": {} - } + "onCreateCommand": "pnpm install --frozen-lockfile --filter @zitadel/login --filter @zitadel/client --filter @zitadel/proto --filter ../..", + "postStartCommand": "pnpm turbo daemon clean || true; (pnpm turbo @zitadel/login#dev&)", + "postAttachCommand": "echo 'THANKS FOR CONTRIBUTING TO ZITADEL!'; echo; echo; echo 'The login is running in hot reloading dev mode'; echo 'Run a specific test file like this:'; echo; echo 'pnpm cypress run --spec integration/login.cy.ts'; echo; echo 'Navigate to the page you want to fix at http://localhost:3001'; echo 'Change the code and reload the page to see the effects'; echo 'Repeat until all tests pass:'; echo; echo 'pnpm cypress run'" } \ No newline at end of file diff --git a/.devcontainer/login-integration-debug/docker-compose.yaml b/.devcontainer/login-integration-debug/docker-compose.yaml index 98528664cf..7262f6b3d2 100644 --- a/.devcontainer/login-integration-debug/docker-compose.yaml +++ b/.devcontainer/login-integration-debug/docker-compose.yaml @@ -3,7 +3,7 @@ services: container_name: login-integration-debug network_mode: service:mock-zitadel extends: - file: ../login-integration-ci/docker-compose.yaml + file: ../base/docker-compose.yaml service: devcontainer mock-zitadel: diff --git a/.github/workflows/login-container.yml b/.github/workflows/login-container.yml index 6473207d1b..fd493fcdd1 100644 --- a/.github/workflows/login-container.yml +++ b/.github/workflows/login-container.yml @@ -77,6 +77,6 @@ jobs: targets: login-standalone files: | ./apps/login/docker-bake.hcl - ./apps/login/docker-bake-release.hcl + ${{ github.event_name == 'workflow_dispatch' && './apps/login/docker-bake-release.hcl' || '' }} ./docker-bake.hcl cwd://${{ steps.login-meta.outputs.bake-file }} diff --git a/apps/login/package.json b/apps/login/package.json index 754696ca02..84c9ce5907 100644 --- a/apps/login/package.json +++ b/apps/login/package.json @@ -15,7 +15,7 @@ "test:unit": "vitest --run", "lint-staged": "lint-staged", "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next", - "test:integration:login": "wait-on --simultaneous 1 http://localhost:3001/ui/v2/login/verify?userId=221394658884845598&code=abc && DISPLAY='' cypress run", + "test:integration:login": "wait-on --simultaneous 1 http://localhost:3001/ui/v2/login/verify?userId=221394658884845598&code=abc && cypress run", "test:acceptance": "dotenv -e ../login/.env.test.local playwright", "test:acceptance:setup": "cd ../.. && make login_test_acceptance_setup_env && NODE_ENV=test turbo run test:acceptance:setup:dev", "test:acceptance:setup:dev": "cd ../.. && make login_test_acceptance_setup_dev"