Skip to content

refactor: Simplify connection-state data structures and move function… #4718

refactor: Simplify connection-state data structures and move function…

refactor: Simplify connection-state data structures and move function… #4718

Workflow file for this run

name: Run e2e tests
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NEXT_PUBLIC_EXPLORER_API_URL: http://localhost:4350/graphql
jobs:
get-sepolia-deployment-url:
runs-on: ubuntu-latest
outputs:
deployment-url: ${{ steps.get-deployment-url.outputs.DEPLOYMENT_URL }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: "package.json"
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 22.12.0
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Get Sepolia deployment url
id: get-deployment-url
run: |
deployment_url=$(node getSepoliaDeploymentUrl.mjs)
echo "DEPLOYMENT_URL=$deployment_url" >> $GITHUB_OUTPUT
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
GITHUB_SHA: ${{ github.sha }}
wait-for-sepolia-deployment:
needs: [get-sepolia-deployment-url]
runs-on: ubuntu-latest
env:
DEPLOYMENT_URL: ${{ needs.get-sepolia-deployment-url.outputs.deployment-url }}
steps:
- uses: UnlyEd/github-action-await-vercel@v1
id: await-vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
with:
deployment-url: ${{ env.DEPLOYMENT_URL }}
timeout: 1200 # Wait for 1200 seconds (20 minutes) before failing
run-e2e-tests-on-sepolia:
needs: [get-sepolia-deployment-url, wait-for-sepolia-deployment]
timeout-minutes: 30
runs-on: ubuntu-latest
env:
DEPLOYMENT_URL: ${{ needs.get-sepolia-deployment-url.outputs.deployment-url }}
container:
image: mcr.microsoft.com/playwright:v1.57.0-jammy
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 22.12.0
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install Playwright
env:
PLAYWRIGHT_BROWSERS_PATH: /root/.cache/ms-playwright
run: cd apps/web && pnpm exec playwright install --with-deps
- name: Run e2e tests
run: pnpm test:e2e
id: e2e
env:
E2E_BASE_URL: ${{ env.DEPLOYMENT_URL }}
HOME: /root