Merge pull request #227 from zitadel/acceptance-test-suite

test(acceptance): username password
This commit is contained in:
Max Peintner
2024-10-28 08:29:44 +01:00
committed by GitHub
18 changed files with 349 additions and 197 deletions

View File

@@ -4,6 +4,10 @@ on: pull_request
jobs:
quality:
env:
ZITADEL_IMAGE: ghcr.io/zitadel/zitadel:v2.63.4
POSTGRES_IMAGE: postgres:17.0-alpine3.19
name: Ensure Quality
runs-on: ubuntu-latest
@@ -21,6 +25,7 @@ jobs:
- lint
- test:unit
- test:integration
- test:acceptance
steps:
- name: Checkout Repo
@@ -37,12 +42,6 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4.0.0
- uses: pnpm/action-setup@v4.0.0
name: Install pnpm
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
@@ -57,17 +56,52 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: CYPRESS_INSTALL_BINARY=0 pnpm install
- run: echo "CYPRESS_VERSION=$(pnpm list -r | grep cypress | cut -d ' ' -f 2)" >> $GITHUB_ENV
if: ${{ matrix.command == 'test:integration' }}
- uses: actions/cache@v4.0.2
name: Setup Cypress binary cache
with:
path: ~/.cache/Cypress
key: ${{ runner.os }}-cypress-binary-${{ hashFiles('**/pnpm-lock.yaml') }}
key: ${{ runner.os }}-cypress-binary-${{ env.CYPRESS_VERSION }}
restore-keys: |
${{ runner.os }}-cypress-binary-
if: ${{ matrix.command }} == "test:integration"
if: ${{ matrix.command == 'test:integration' }}
- name: Install Dependencies
- name: Install Cypress Browsers
run: pnpm install
if: ${{ matrix.command == 'test:integration' }}
- run: echo "PLAYWRIGHT_VERSION=$(npx playwright --version | cut -d ' ' -f 2)" >> $GITHUB_ENV
if: ${{ matrix.command == 'test:acceptance' }}
- uses: actions/cache@v4.0.2
name: Setup Playwright binary cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-binary-${{ env.PLAYWRIGHT_VERSION }}
restore-keys: |
${{ runner.os }}-playwright-binary-
if: ${{ matrix.command == 'test:acceptance' }}
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
if: ${{ matrix.command == 'test:acceptance' }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
if: ${{ matrix.command == 'test:acceptance' }}
- name: Run ZITADEL
run: ZITADEL_DEV_UID=root pnpm run-zitadel
if: ${{ matrix.command == 'test:acceptance' }}
- name: Install Playwright Browsers
run: pnpm build
if: ${{ matrix.command == 'test:acceptance' }}
- name: Check
id: check