adding e2e tests for basenames registration flow #1
Workflow file for this run
This file contains hidden or 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: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| e2e: | |
| runs-on: ubuntu-latest | |
| environment: CI | |
| env: | |
| E2E_TEST_SEED_PHRASE: ${{ secrets.E2E_TEST_SEED_PHRASE }} | |
| E2E_TEST_FORK_URL: ${{ secrets.E2E_TEST_FORK_URL }} | |
| E2E_TEST_FORK_BLOCK_NUMBER: '31397553' | |
| E2E_TEST: 'true' | |
| TEST_BASENAME: 'testbasename123' | |
| NEXT_PUBLIC_CDP_BASE_RPC_ENDPOINT: 'http://localhost:8545/' | |
| steps: | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Set up Corepack & Yarn | |
| run: | | |
| npm install -g corepack | |
| corepack enable | |
| yarn set version 3.5.0 | |
| - name: Install root dependencies | |
| run: yarn install | |
| - name: Install Foundry | |
| uses: foundry-rs/[email protected] | |
| - name: Prepare MetaMask extension | |
| run: yarn e2e:prepare-metamask | |
| - name: Install Playwright browsers | |
| run: yarn playwright install --with-deps | |
| - name: Install xvfb | |
| run: sudo apt-get update && sudo apt-get install -y xvfb | |
| - name: Write .env file | |
| run: | | |
| echo "E2E_TEST_SEED_PHRASE=$E2E_TEST_SEED_PHRASE" >> .env | |
| echo "E2E_TEST_FORK_URL=$E2E_TEST_FORK_URL" >> .env | |
| echo "E2E_TEST_FORK_BLOCK_NUMBER=$E2E_TEST_FORK_BLOCK_NUMBER" >> .env | |
| echo "E2E_TEST=$E2E_TEST" >> .env | |
| echo "TEST_BASENAME=$TEST_BASENAME" >> .env | |
| echo "NEXT_PUBLIC_CDP_BASE_RPC_ENDPOINT=$NEXT_PUBLIC_CDP_BASE_RPC_ENDPOINT" >> .env | |
| - name: Build application | |
| run: yarn build | |
| - name: Run E2E tests | |
| run: xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" yarn test:e2e |