✅ test: Add back e2e tests CHA-116 #1544
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
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
merge_group: | |
name: E2E | |
jobs: | |
e2e-vite: | |
name: Playwright E2E @evmts/example-vite | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: "Setup" | |
uses: ./.github/actions/setup | |
- name: Run server | |
run: anvil --port=8546 --fork-url ${{ secrets.RPC_URL_MAINNET }} --fork-block-number 14457512 & | |
env: | |
ANVIL_FORK_URL: ${{ secrets.ANVIL_FORK_URL }} | |
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | |
ANVIL_RPC_URL_1: ${{ secrets.RPC_URL_MAINNET }} | |
EXAMPLE_PROJECT: "@evmts/example-vite" | |
SERVER_PORT: 5173 | |
VITE_RPC_URL_1: "http://localhost:8546" | |
VITE_RPC_URL_10: "http://localhost:9545" | |
VITE_RPC_URL_420: "http://localhost:9546" | |
PRIVATE_KEY: "test test test test test test test test test test test junk" | |
- name: Run Playwright | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 20 | |
max_attempts: 3 | |
command: pnpm i && npx playwright install && pnpm nx affected --target=e2e:ci | |
env: | |
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} | |
ANVIL_RPC_URL_1: ${{ secrets.RPC_URL_MAINNET }} | |
EXAMPLE_PROJECT: "@evmts/example-vite" | |
SERVER_PORT: 5173 | |
VITE_RPC_URL_1: "http://localhost:8546" | |
VITE_RPC_URL_10: "http://localhost:9545" | |
VITE_RPC_URL_420: "http://localhost:9546" | |
PRIVATE_KEY: "test test test test test test test test test test test junk" | |
- name: Shutdown Anvil | |
run: pkill -2 anvil | |