This commit is contained in:
Elio Bischof
2024-11-27 12:38:19 +01:00
parent 0bae8d916a
commit 64b2dc4610

View File

@@ -5,6 +5,20 @@ on:
schedule: schedule:
# All 1 minutes # All 1 minutes
- cron: '* * * * *' - cron: '* * * * *'
workflow_dispatch:
inputs:
zitadel-api-url:
description: 'ZITADEL API URL'
required: true
default: ${{ secrets.E2E_QA_ZITADEL_API_URL }}
zitadel-service-user-id:
description: 'ZITADEL SERVICE USER ID'
required: true
default: ${{ secrets.E2E_QA_ZITADEL_SERVICE_USER_ID }}
zitadel-service-user-token:
description: 'ZITADEL SERVICE USER TOKEN'
required: true
default: ${{ secrets.E2E_QA_ZITADEL_SERVICE_USER_TOKEN }}
jobs: jobs:
matrix: matrix:
@@ -19,6 +33,8 @@ jobs:
run: | run: |
if [ -z "${{ github.event.schedule }}" ]; then if [ -z "${{ github.event.schedule }}" ]; then
echo "matrix=$(echo '[\"test:acceptance:qa\", \"test:acceptance:prod\"]' | jq -R .)" >> $GITHUB_OUTPUT echo "matrix=$(echo '[\"test:acceptance:qa\", \"test:acceptance:prod\"]' | jq -R .)" >> $GITHUB_OUTPUT
else if [ -z "${{ github.event.inputs.zitadel-api-url }}" ]; then
echo "matrix=$(echo '[\"test:acceptance:custom\"]' | jq -R .)" >> $GITHUB_OUTPUT
else else
echo "matrix=$(echo '[\"format --check\", \"lint\", \"test:unit\", \"test:integration\", \"test:acceptance\"]' | jq -R .)" >> $GITHUB_OUTPUT echo "matrix=$(echo '[\"format --check\", \"lint\", \"test:unit\", \"test:integration\", \"test:acceptance\"]' | jq -R .)" >> $GITHUB_OUTPUT
fi fi
@@ -100,11 +116,11 @@ jobs:
- name: Create Production Build - name: Create Production Build
run: pnpm build run: pnpm build
if: ${{ matrix.command == 'test:acceptance:qa' || matrix.command == 'test:acceptance:prod' }} if: ${{ matrix.command == 'test:acceptance:qa' || matrix.command == 'test:acceptance:prod' || matrix.command == 'test:acceptance:custom' }}
env: env:
ZITADEL_API_URL: ${{ secrets.E2E_QA_ZITADEL_API_URL }} ZITADEL_API_URL: ${{ matrix.command == 'test:acceptance:custom' && github.event.inputs.zitadel-api-url || secrets.E2E_QA_ZITADEL_API_URL }}
ZITADEL_SERVICE_USER_ID: ${{ secrets.E2E_QA_ZITADEL_SERVICE_USER_ID }} ZITADEL_SERVICE_USER_ID: ${{ matrix.command == 'test:acceptance:custom' && github.event.inputs.zitadel-service-user-id || secrets.E2E_QA_ZITADEL_SERVICE_USER_ID }}
ZITADEL_SERVICE_USER_TOKEN: ${{ secrets.E2E_QA_ZITADEL_SERVICE_USER_TOKEN }} ZITADEL_SERVICE_USER_TOKEN: ${{ matrix.command == 'test:acceptance:custom' && github.event.inputs.zitadel-service-user-token || secrets.E2E_QA_ZITADEL_SERVICE_USER_TOKEN }}
- name: Check - name: Check
id: check id: check