2022-08-05 18:00:46 +00:00
|
|
|
name: "ZITADEL e2e Tests"
|
|
|
|
|
|
|
|
on:
|
2022-08-11 09:28:01 +00:00
|
|
|
workflow_run:
|
|
|
|
workflows: [ZITADEL Release]
|
|
|
|
types:
|
|
|
|
- completed
|
2022-08-05 18:00:46 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
releaseversion:
|
|
|
|
description: 'Release version to test'
|
|
|
|
required: true
|
|
|
|
default: 'latest'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
2022-08-10 15:24:19 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
browser: [firefox, chrome]
|
2022-08-05 18:00:46 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2022-08-05 18:23:10 +00:00
|
|
|
env:
|
|
|
|
ZITADEL_IMAGE_REGISTRY: 'ghcr.io/zitadel/zitadel'
|
2022-08-05 18:00:46 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set TAG env manual trigger
|
|
|
|
if: github.event_name == 'workflow_dispatch'
|
2022-08-05 18:23:10 +00:00
|
|
|
run: echo "ZITADEL_IMAGE=${ZITADEL_IMAGE_REGISTRY}:${{ github.event.inputs.releaseversion }}" >> $GITHUB_ENV
|
2022-08-11 09:28:01 +00:00
|
|
|
- name: Set TAG env on ZITADEL release
|
|
|
|
if: github.event_name == 'workflow_run'
|
2022-08-05 18:23:10 +00:00
|
|
|
run: echo "ZITADEL_IMAGE=${ZITADEL_IMAGE_REGISTRY}:${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
2022-08-05 18:00:46 +00:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
with:
|
|
|
|
driver: docker
|
|
|
|
install: true
|
2022-08-10 15:24:19 +00:00
|
|
|
- name: Test ${{ matrix.browser }}
|
|
|
|
run: docker compose run e2e --browser ${{ matrix.browser }}
|
2022-08-05 18:00:46 +00:00
|
|
|
working-directory: e2e
|
2022-09-23 11:37:39 +00:00
|
|
|
- name: Ensure Artifacts Directory Exists
|
|
|
|
run: mdkir -p ./.artifacts
|
|
|
|
- name: Save ZITADEL Logs
|
|
|
|
if: always()
|
|
|
|
run: docker compose logs zitadel > ../.artifacts/e2e-compose-zitadel.log
|
|
|
|
working-directory: e2e
|
|
|
|
- name: Save Prepare Logs
|
|
|
|
if: always()
|
|
|
|
run: docker compose logs prepare > ../.artifacts/e2e-compose-prepare.log
|
|
|
|
working-directory: e2e
|
2022-08-10 15:24:19 +00:00
|
|
|
- name: Archive production tests ${{ matrix.browser }}
|
2022-08-05 18:00:46 +00:00
|
|
|
if: always()
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
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/results
|
|
|
|
e2e/cypress/videos
|
|
|
|
e2e/cypress/screenshots
|
2022-09-23 11:37:39 +00:00
|
|
|
.artifacts/e2e-compose-zitadel.log
|
|
|
|
.artifacts/e2e-compose-prepare.log
|
2022-08-05 18:00:46 +00:00
|
|
|
retention-days: 30
|