Skip to content

feat: Add custom subField #54

feat: Add custom subField

feat: Add custom subField #54

name: Test Zitadel OAuth
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
jobs:
test-zitadel-oauth:
runs-on: ubuntu-22.04
env:
##########################################################################
# App Config
##########################################################################
NEXT_PUBLIC_URL: "http://localhost:3000"
DATABASE_URI: "file:./payload-oauth2.db"
PAYLOAD_SECRET: "hellohereisasecretforyou"
##########################################################################
# Zitadel OAuth Config
##########################################################################
ZITADEL_CLIENT_ID: ${{ secrets.ZITADEL_CLIENT_ID }}
ZITADEL_CLIENT_SECRET: ${{ secrets.ZITADEL_CLIENT_SECRET }}
ZITADEL_TOKEN_ENDPOINT: ${{ secrets.ZITADEL_TOKEN_ENDPOINT }}
ZITADEL_AUTHORIZATION_URL: ${{ secrets.ZITADEL_AUTHORIZATION_URL }}
ZITADEL_USERINFO_ENDPOINT: ${{ secrets.ZITADEL_USERINFO_ENDPOINT }}
##########################################################################
# Test Config
##########################################################################
# Optional: Set to "true" to run test browser in headless mode
HEADLESS: true
##########################################################################
# Zitadel Test Account
##########################################################################
# Required: Zitadel Test Account Email
ZITADEL_TEST_EMAIL: ${{ secrets.ZITADEL_TEST_EMAIL }}
# Required: Zitadel Test Account Password
ZITADEL_TEST_PASSWORD: ${{ secrets.ZITADEL_TEST_PASSWORD }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
- run: pnpm install
- run: |
npx puppeteer browsers install chrome
- name: Run test
run: |
for i in {1..3}; do
echo "Attempt $i"
if pnpm test:zitadel; then
echo "Success on attempt $i"
exit 0
fi
echo "Attempt $i failed, retrying..."
done
echo "All attempts failed"
exit 1