Skip to content

👷 ci: Use self-hosted runner for E2E tests #304

👷 ci: Use self-hosted runner for E2E tests

👷 ci: Use self-hosted runner for E2E tests #304

Workflow file for this run

name: 🧑‍🔧 Test
on:
push:
branches:
- new-dawn
pull_request:
jobs:
test-unit:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node & Install dependencies
uses: ./.github/actions/setup
- name: Build project
run: pnpm run build
- name: Run tests
run: pnpm run test
test-e2e-headful:
name: Run E2E tests (headful)
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Setup Node & Install dependencies
uses: ./.github/actions/setup
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
# For now, we only need Chromium.
- name: Install browsers for Playwright
run: pnpm dlx playwright install chromium
- name: Build project
run: pnpm run build
# Skipping this for now, `xvfb` is already installed on the self-hosted runner.
#- name: Install linux dependencies
# run: |
# sudo apt-get install --no-install-recommends -y \
# xvfb
- name: Build project
run: pnpm run build
- name: Serve MetaMask Test Dapp
run: |
pnpm run serve:test-dapp &
- name: Build cache
run: |
xvfb-run pnpm run build:cache
- name: Run E2E tests (headful)
run: |
xvfb-run pnpm run test:e2e:headful
- name: Archive Playwright report
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: playwright-report-headful
path: |
wallets/metamask/playwright-report-headful/
if-no-files-found: error