diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index e717163507..b7f24f0a24 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -12,44 +12,45 @@ jobs: browser: [firefox, chrome] runs-on: ubuntu-latest steps: - - - name: Checkout Repository + - name: Checkout Repository uses: actions/checkout@v4 - - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v4 with: path: .artifacts name: zitadel-linux-amd64 - - - name: Unpack executable + - name: Unpack executable run: | tar -xvf .artifacts/zitadel-linux-amd64.tar.gz mv zitadel-linux-amd64/zitadel ./zitadel - - - name: Set up QEMU + - name: Set up QEMU uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - - name: Start DB and ZITADEL + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "pnpm" + cache-dependency-path: pnpm-lock.yaml + - name: Install dependencies + run: pnpm install + - name: Start DB and ZITADEL run: | cd ./e2e ZITADEL_IMAGE=zitadel:local docker compose up --detach --wait - - - name: Cypress run + - name: Cypress run uses: cypress-io/github-action@v6 env: CYPRESS_BASE_URL: http://localhost:8080/ui/console CYPRESS_WEBHOOK_HANDLER_HOST: host.docker.internal - CYPRESS_DATABASE_CONNECTION_URL: 'postgresql://root@localhost:26257/zitadel' + CYPRESS_DATABASE_CONNECTION_URL: "postgresql://root@localhost:26257/zitadel" CYPRESS_BACKEND_URL: http://localhost:8080 with: working-directory: e2e browser: ${{ matrix.browser }} config-file: cypress.config.ts - - - uses: actions/upload-artifact@v4 + install: false + - uses: actions/upload-artifact@v4 if: always() with: name: production-tests-${{ matrix.browser }} diff --git a/e2e/package.json b/e2e/package.json index 01c2995907..8b6b79735e 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -2,16 +2,16 @@ "name": "zitadel-e2e", "version": "0.0.0", "scripts": { - "open": "npx cypress open", - "e2e": "npx cypress run", - "open:golang": "npm run open --", - "e2e:golang": "npm run e2e --", - "open:golangangular": "CYPRESS_BASE_URL=http://localhost:4200 CYPRESS_BACKEND_URL=http://localhost:8080 npm run open --", - "e2e:golangangular": "CYPRESS_BASE_URL=http://localhost:4200 CYPRESS_BACKEND_URL=http://localhost:8080 npm run e2e --", - "open:angulargolang": "npm run open:golangangular --", - "e2e:angulargolang": "npm run e2e:golangangular --", - "open:angular": "CYPRESS_BASE_URL=http://localhost:4200 CYPRESS_BACKEND_URL=http://localhost:8080 CYPRESS_WEBHOOK_HANDLER_HOST=host.docker.internal npm run open --", - "e2e:angular": "CYPRESS_BASE_URL=http://localhost:4200 CYPRESS_BACKEND_URL=http://localhost:8080 CYPRESS_WEBHOOK_HANDLER_HOST=host.docker.internal npm run e2e --", + "open": "pnpm exec cypress open", + "e2e": "pnpm exec cypress run", + "open:golang": "pnpm run open --", + "e2e:golang": "pnpm run e2e --", + "open:golangangular": "CYPRESS_BASE_URL=http://localhost:4200 CYPRESS_BACKEND_URL=http://localhost:8080 pnpm run open --", + "e2e:golangangular": "CYPRESS_BASE_URL=http://localhost:4200 CYPRESS_BACKEND_URL=http://localhost:8080 pnpm run e2e --", + "open:angulargolang": "pnpm run open:golangangular --", + "e2e:angulargolang": "pnpm run e2e:golangangular --", + "open:angular": "CYPRESS_BASE_URL=http://localhost:4200 CYPRESS_BACKEND_URL=http://localhost:8080 CYPRESS_WEBHOOK_HANDLER_HOST=host.docker.internal pnpm run open --", + "e2e:angular": "CYPRESS_BASE_URL=http://localhost:4200 CYPRESS_BACKEND_URL=http://localhost:8080 CYPRESS_WEBHOOK_HANDLER_HOST=host.docker.internal pnpm run e2e --", "lint": "prettier --check cypress", "lint:fix": "prettier --write cypress" }, diff --git a/e2e/turbo.json b/e2e/turbo.json new file mode 100644 index 0000000000..972f2b327a --- /dev/null +++ b/e2e/turbo.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://turbo.build/schema.json", + "extends": ["//"], + "tasks": { + "e2e": { + "cache": false, + "persistent": false + }, + "e2e:golang": { + "cache": false, + "persistent": false + }, + "e2e:golangangular": { + "cache": false, + "persistent": false + }, + "e2e:angular": { + "cache": false, + "persistent": false + }, + "lint": { + "outputs": [] + } + } +} diff --git a/login/turbo.json b/login/turbo.json index 5b28dc0c0f..0702817cc2 100644 --- a/login/turbo.json +++ b/login/turbo.json @@ -14,11 +14,11 @@ "outputs": ["dist/**"], "dependsOn": ["@zitadel/proto#generate"] }, - "@zitadel/client#build": { + "client:build": { "outputs": ["dist/**"], "dependsOn": ["@zitadel/proto#generate"] }, - "@zitadel/proto#generate": { + "proto:generate": { "outputs": ["zitadel/**"], "cache": false }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index db2cf26503..bb0e376265 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22802,7 +22802,7 @@ snapshots: copy-webpack-plugin@11.0.0(webpack@5.99.9(@swc/core@1.12.9(@swc/helpers@0.5.17))(esbuild@0.25.5)): dependencies: - fast-glob: 3.3.1 + fast-glob: 3.3.3 glob-parent: 6.0.2 globby: 13.2.2 normalize-path: 3.0.0