adding e2e tests for basenames registration flow #6
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] | |
| permissions: | |
| contents: read | |
| jobs: | |
| e2e: | |
| runs-on: ubuntu-latest | |
| environment: CI | |
| strategy: | |
| matrix: | |
| node-version: [18.x] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'yarn' | |
| - name: Set E2E env variables | |
| working-directory: apps/web | |
| run: | | |
| echo "E2E_TEST_SEED_PHRASE=${{ secrets.E2E_TEST_SEED_PHRASE }}" > .env | |
| echo "E2E_TEST_FORK_URL=${{ secrets.E2E_TEST_FORK_URL }}" >> .env | |
| echo "E2E_TEST_FORK_BLOCK_NUMBER=31397553" >> .env | |
| echo "E2E_TEST=true" >> .env | |
| echo "TEST_BASENAME=testbasename123" >> .env | |
| echo "NEXT_PUBLIC_CDP_BASE_RPC_ENDPOINT=http://localhost:8545/" >> .env | |
| - name: Install dependencies | |
| run: yarn | |
| - 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: Build application | |
| run: yarn build | |
| - name: Run E2E tests | |
| run: xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" yarn test:e2e |