Skip to content

E2E Tests

E2E Tests #54

Workflow file for this run

name: E2E Tests
on:
workflow_dispatch:
workflow_call:
inputs:
branch:
description: 'The branch to use'
default: 'main'
required: false
type: string
base-url:
description: 'The AppKit App url'
default: 'http://localhost:8081/'
required: false
type: string
wallet-url:
description: 'The wallet url'
default: 'https://react-wallet.walletconnect.com/'
required: false
type: string
secrets:
CLOUD_PROJECT_ID:
required: true
jobs:
e2e_tests:
name: 'Playwright Tests'
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
repository: reown-com/appkit-react-native
ref: ${{ inputs.branch }}
- name: Setup
uses: ./.github/actions/setup
- name: Build SDK
run: |
echo "Building SDK..."
yarn build
- name: Create ENV file in apps/native
working-directory: ./apps/native/
run: echo "EXPO_PUBLIC_PROJECT_ID=${{ secrets.CLOUD_PROJECT_ID }}" >> .env
- name: Install Playwright Browsers
working-directory: ./apps/native/
run: yarn playwright install chromium
## Uncomment to build the web and add ./apps/native/dist to upload the artifact
# - name: Build web app
# working-directory: ./apps/native/
# run: |
# echo "Building web app..."
# yarn build:web
- name: Run Playwright tests
working-directory: ./apps/native/
env:
BASE_URL: ${{ inputs.base-url }}
WALLET_URL: ${{ inputs.wallet-url }}
## Uncomment to see better logs in the terminal
# DEBUG: pw:api
run: |
echo "Running tests against $BASE_URL"
yarn playwright:test
- uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report
path: |
./apps/native/playwright-report/
./apps/native/test-results/
retention-days: 7