2022-08-05 18:00:46 +00:00
|
|
|
name: "ZITADEL e2e Tests"
|
|
|
|
|
|
|
|
on:
|
2023-07-17 08:08:20 +00:00
|
|
|
workflow_call:
|
2022-08-05 18:00:46 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
2024-05-24 11:32:57 +00:00
|
|
|
timeout-minutes: 10
|
2022-08-10 15:24:19 +00:00
|
|
|
strategy:
|
2023-07-17 08:08:20 +00:00
|
|
|
fail-fast: false
|
2022-08-10 15:24:19 +00:00
|
|
|
matrix:
|
|
|
|
browser: [firefox, chrome]
|
2024-04-03 22:15:00 +00:00
|
|
|
runs-on:
|
|
|
|
group: zitadel-public
|
2022-08-05 18:00:46 +00:00
|
|
|
steps:
|
2023-07-17 08:08:20 +00:00
|
|
|
-
|
|
|
|
name: Checkout Repository
|
2024-03-14 09:26:31 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-08-10 12:21:01 +00:00
|
|
|
-
|
2024-03-06 07:26:03 +00:00
|
|
|
uses: actions/download-artifact@v4
|
2023-08-10 12:21:01 +00:00
|
|
|
with:
|
|
|
|
path: .artifacts
|
|
|
|
name: zitadel-linux-amd64
|
|
|
|
-
|
|
|
|
name: Unpack executable
|
|
|
|
run: |
|
2023-08-11 12:49:28 +00:00
|
|
|
tar -xvf .artifacts/zitadel-linux-amd64.tar.gz
|
2023-08-10 12:21:01 +00:00
|
|
|
mv zitadel-linux-amd64/zitadel ./zitadel
|
|
|
|
-
|
|
|
|
name: Set up QEMU
|
2024-03-06 08:29:51 +00:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2023-08-10 12:21:01 +00:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2024-03-07 15:38:38 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2023-08-10 12:21:01 +00:00
|
|
|
with:
|
|
|
|
driver-opts: 'image=moby/buildkit:v0.11.6'
|
|
|
|
-
|
|
|
|
name: Start DB and ZITADEL
|
|
|
|
run: |
|
|
|
|
cd ./e2e
|
|
|
|
ZITADEL_IMAGE=zitadel:local docker compose up --detach --wait
|
2023-07-17 08:08:20 +00:00
|
|
|
-
|
|
|
|
name: Cypress run
|
2024-03-07 15:38:38 +00:00
|
|
|
uses: cypress-io/github-action@v6
|
2023-07-17 08:08:20 +00:00
|
|
|
env:
|
|
|
|
CYPRESS_BASE_URL: http://localhost:8080/ui/console
|
|
|
|
CYPRESS_WEBHOOK_HANDLER_HOST: host.docker.internal
|
2023-08-10 12:21:01 +00:00
|
|
|
CYPRESS_DATABASE_CONNECTION_URL: 'postgresql://root@localhost:26257/zitadel'
|
2023-07-17 08:08:20 +00:00
|
|
|
CYPRESS_BACKEND_URL: http://localhost:8080
|
2022-08-05 18:00:46 +00:00
|
|
|
with:
|
2023-07-17 08:08:20 +00:00
|
|
|
working-directory: e2e
|
|
|
|
browser: ${{ matrix.browser }}
|
|
|
|
config-file: cypress.config.ts
|
|
|
|
-
|
2024-03-06 07:26:03 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-07-17 08:08:20 +00:00
|
|
|
if: always()
|
2022-08-05 18:00:46 +00:00
|
|
|
with:
|
2022-08-10 15:24:19 +00:00
|
|
|
name: production-tests-${{ matrix.browser }}
|
2022-08-05 18:00:46 +00:00
|
|
|
path: |
|
|
|
|
e2e/cypress/screenshots
|
2023-07-17 08:08:20 +00:00
|
|
|
e2e/cypress/videos
|
|
|
|
e2e/cypress/results
|
2022-08-05 18:00:46 +00:00
|
|
|
retention-days: 30
|