Skip to content

e2e custom fee token #2

e2e custom fee token

e2e custom fee token #2

Workflow file for this run

name: E2E tests
on:
workflow_call:
inputs:
test_type:
required: true
type: string
env:
NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }}
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID }}
THE_GRAPH_NETWORK_API_KEY: ${{ secrets.THE_GRAPH_NETWORK_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
load-e2e-files:
name: "Load e2e files"
if: inputs.test_type.type != 'cctp'
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.e2eFiles }}
steps:
- name: Checkout
uses: actions/checkout@v4
- id: set-matrix
run: echo "e2eFiles=$(node .github/workflows/formatSpecfiles.js ${{ inputs.test_type }} | jq . --compact-output)" >> $GITHUB_OUTPUT
test-e2e:
name: "Test E2E - ${{ matrix.test.name }}${{ matrix.test.type == 'orbit-eth' && ' with L3' matrix.test.type == 'orbit-custom' && ' with custom fee token' || ''}}" needs: [load-e2e-files]

Check failure on line 31 in .github/workflows/e2e-tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/e2e-tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 31
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: ${{ fromJson(needs.load-e2e-files.outputs.matrix) }}
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true
# we found on 26 Sep that using Chrome 129 mysteriously broke ci at setupMetamask step
# with the following error: > Cannot read properties of undefined (reading 'waitForTimeout')
# so we are reverting to Chrome 128 on ci
# https://www.ubuntuupdates.org/package_logs?type=ppas&vals=8
- name: Set up Chrome 128
run: |
wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_128.0.6613.137-1_amd64.deb
sudo apt-get install ./google-chrome-stable_128.0.6613.137-1_amd64.deb
- name: Checkout
uses: actions/checkout@v4
- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
- name: Restore build artifacts
uses: ./.github/actions/build-artifacts/restore
- name: Install cypress
run: yarn cypress install
- name: Install linux dependencies
run: |
sudo apt-get install --no-install-recommends -y \
fluxbox \
xvfb
- name: Run xvfb and fluxbox
run: |
Xvfb :0 -screen 0 1366x768x24 -listen tcp -ac &
fluxbox &
env:
DISPLAY: :0.0
- name: Run nitro testnode
if: inputs.test_type != 'cctp'
uses: OffchainLabs/actions/run-nitro-test-node@a20a76172ce524832ac897bef2fa10a62ed81c29
with:
nitro-testnode-ref: aab133aceadec2e622f15fa438f6327e3165392d
l3-node: ${{ matrix.test.type != 'regular' }}
no-l3-token-bridge: ${{ matrix.test.type == 'regular' }}
args: ${{ matrix.test.type == 'orbit-custom' && '--l3-fee-token' || '' }}
- name: Run e2e tests via cypress-io/github-action
uses: cypress-io/github-action@0da3c06ed8217b912deea9d8ee69630baed1737e # [email protected]
with:
start: ${{ matrix.test.type == 'orbit-custom' && 'NEXT_PUBLIC_CUSTOM_FEE_TOKEN=true yarn start' || 'yarn start' }}
command: >-
${{
(matrix.test.type != 'regular') && 'yarn test:e2e:orbit --browser chromium' ||
'yarn test:e2e --browser chromium'
}}
wait-on: http://127.0.0.1:3000
wait-on-timeout: 120
spec: ./packages/arb-token-bridge-ui/tests/e2e/specs/*
env:
DISPLAY: :0.0
TEST_FILE: ${{ matrix.test.file }}
SKIP_METAMASK_SETUP: true
CYPRESS_RECORD_VIDEO: ${{ matrix.test.recordVideo }}
PRIVATE_KEY_CUSTOM: ${{ secrets.E2E_PRIVATE_KEY }}
PRIVATE_KEY_USER: ${{ secrets.E2E_PRIVATE_KEY_USER }}
PRIVATE_KEY_CCTP: ${{ secrets.E2E_PRIVATE_KEY_CCTP }}
NEXT_PUBLIC_IS_E2E_TEST: true
NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }}
NEXT_PUBLIC_LOCAL_ETHEREUM_RPC_URL: http://127.0.0.1:8545
NEXT_PUBLIC_LOCAL_ARBITRUM_RPC_URL: http://127.0.0.1:8547
NEXT_PUBLIC_LOCAL_L3_RPC_URL: http://127.0.0.1:3347
- name: Archive e2e artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-artifacts-${{ github.sha }}-${{ matrix.test.name }}-${{ (matrix.test.type == 'cctp' && 'cctp') || (matrix.test.type == 'orbit-eth' && 'l3') || (matrix.test.type == 'orbit-custom' && 'custom-fee-token') || 'regular'}}
path: |
./packages/arb-token-bridge-ui/cypress/videos
./packages/arb-token-bridge-ui/cypress/screenshots
if-no-files-found: 'ignore'
continue-on-error: true
clean-up:
name: "Clean Up"
runs-on: ubuntu-latest
needs: [test-e2e]
if: always()
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install gh-actions-cache
run: gh extension install actions/gh-actions-cache
- name: Delete build artifacts
run: |
if gh actions-cache list | grep build-artifacts-${{ github.run_id }}-${{ github.run_attempt }}
then
gh actions-cache delete build-artifacts-${{ github.run_id }}-${{ github.run_attempt }} --confirm
fi
shell: bash