diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 00000000..6161b62d --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,45 @@ +name: E2E Integration Tests + +# Runs on every PR as a non-blocking check. + +on: + pull_request: + +jobs: + e2e: + name: Integration / E2E Tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + + - name: Install Dependencies + run: pnpm install + + - name: Build TypeScript + run: pnpm build + + - name: Build EVM contracts + run: pnpm build:contracts:evm + + - name: E2E tests + env: + # pick a free rpc provider from https://chainlist.org/ + FORK_URL: https://api.zan.top/eth-mainnet + run: pnpm run test:integration diff --git a/jest.integration.config.js b/jest.integration.config.js index 3c2561be..be769e8e 100644 --- a/jest.integration.config.js +++ b/jest.integration.config.js @@ -16,6 +16,6 @@ module.exports = { '^bn.js$': 'bn.js', '^bignumber.js$': 'bignumber.js', '^@solana/web3.js$': '@solana/web3.js', - '(.+)\\.js': '$1' + '(.+)\\.js$': '$1' } } diff --git a/tests/utils/setup-evm.ts b/tests/utils/setup-evm.ts index 93423e46..31aa7088 100644 --- a/tests/utils/setup-evm.ts +++ b/tests/utils/setup-evm.ts @@ -110,7 +110,7 @@ async function startNode( .withCommand([ `anvil -f ${forkUrl} --chain-id ${chainId} --mnemonic 'hat hat horse border print cancel subway heavy copy alert eternal mask' --host 0.0.0.0` ]) - .withWaitStrategy(new LogWaitStrategy('Listening on 0.0.0.0:8545', 1)) + .withWaitStrategy(new LogWaitStrategy('Listening on', 1)) .withName(`anvil_cross_chain_tests_${chainId}_${randBigInt(100n)}`) .start()