zitadel/.github/workflows/e2e.yml
Christian Jakob 0b7ca8a143
ci(e2e): get correct last semver tag (#4497)
fix: get last senver tag
2022-10-07 09:18:47 +00:00

67 lines
2.2 KiB
YAML

name: "ZITADEL e2e Tests"
on:
workflow_run:
workflows: [ZITADEL Release]
types:
- completed
workflow_dispatch:
inputs:
releaseversion:
description: 'Release version to test'
required: true
default: 'latest'
jobs:
test:
strategy:
matrix:
browser: [firefox, chrome]
runs-on: ubuntu-20.04
env:
ZITADEL_IMAGE_REGISTRY: 'ghcr.io/zitadel/zitadel'
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set TAG env manual trigger
if: github.event_name == 'workflow_dispatch'
run: echo "ZITADEL_IMAGE=${ZITADEL_IMAGE_REGISTRY}:${{ github.event.inputs.releaseversion }}" >> $GITHUB_ENV
- name: get latest tag
uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
with:
semver_only: true
- name: Set TAG env on ZITADEL release
if: github.event_name == 'workflow_run'
run: echo "ZITADEL_IMAGE=${ZITADEL_IMAGE_REGISTRY}:${{ steps.get-latest-tag.outputs.tag }}" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver: docker
install: true
- name: Test ${{ matrix.browser }}
run: docker compose run e2e --browser ${{ matrix.browser }}
working-directory: e2e
- 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
- name: Archive production tests ${{ matrix.browser }}
if: always()
uses: actions/upload-artifact@v2
with:
name: production-tests-${{ matrix.browser }}
path: |
e2e/cypress/results
e2e/cypress/videos
e2e/cypress/screenshots
.artifacts/e2e-compose-zitadel.log
.artifacts/e2e-compose-prepare.log
retention-days: 30