E2E Tests #49
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
skip_setup: | |
description: 'Skip setup steps if already done' | |
type: boolean | |
default: false | |
secrets: | |
CLOUD_PROJECT_ID: | |
required: true | |
jobs: | |
e2e_tests: | |
name: 'Playwright Tests' | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
if: ${{ !inputs.skip_setup }} | |
uses: actions/checkout@v4 | |
with: | |
repository: reown-com/appkit-react-native | |
ref: ${{ inputs.branch }} | |
- name: Setup | |
if: ${{ !inputs.skip_setup }} | |
uses: ./.github/actions/setup | |
- name: Build SDK | |
if: ${{ !inputs.skip_setup }} | |
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 | |
- 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: always() | |
with: | |
name: playwright-report | |
path: | | |
./apps/native/playwright-report/ | |
./apps/native/test-results/ | |
./apps/native/dist/ | |
retention-days: 7 |