Skip to content

Temp test email link fixes #190

Temp test email link fixes

Temp test email link fixes #190

Workflow file for this run

name: End-to-End testing check for Playground Apps
env:
BRANCH_NAME_RAW: ${{ github.head_ref || github.ref_name }}
on:
pull_request:
branches: [ main ]
push:
branches:
- playwright_setup
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
BRANCH_NAME: ${{ steps.set_branch_name.outputs.BRANCH_NAME }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Normalize branch name
id: set_branch_name
run: echo "BRANCH_NAME=$(echo $BRANCH_NAME_RAW | tr '/_' '-')" >> $GITHUB_OUTPUT
shell: bash
- name: Set up Node.js
uses: actions/setup-node@v4
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: |
npm ci
npm install lerna
- name: Upload node_modules
uses: actions/upload-artifact@v4
with:
name: node-modules
path: node_modules
e2e-tests:
timeout-minutes: 60
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix:
include:
- app: "react"
url: ".react.playground.corbado.io/"
type: "ui"
# - app: "react-sdk"
# url: ".react-sdk.korbado.com/"
# type: "sdk"
# Add more playground apps as needed
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
- name: Download node_modules
uses: actions/download-artifact@v4
with:
name: node-modules
path: node_modules
- name: Grant execute permissions for Playwright
run: chmod +x node_modules/.bin/playwright
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run E2E Test for ${{ matrix.app }}
run: |
if [ "${{ matrix.type }}" = "sdk" ]; then
npm run test:e2e:sdk
else
npm run test:e2e:ui
fi
env:
PLAYWRIGHT_TEST_URL: ${{ format('https://{0}{1}', needs.prepare.outputs.BRANCH_NAME, matrix.url) }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: packages/tests-e2e/playwright-report/
retention-days: 30