feat: add e2e test suite with evm contracts deployments #28
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
name: e2e | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
pull_request: | |
paths: | |
- "**.rs" | |
- "**.go" | |
- "**.toml" | |
- "**.lock" | |
- "**.mod" | |
- "**.sum" | |
- "**.sol" | |
- ".github/workflows/e2e.yml" | |
env: | |
FOUNDRY_PROFILE: ci | |
FOUNDRY_VERSION: nightly | |
permissions: | |
contents: read | |
jobs: | |
e2e: | |
strategy: | |
fail-fast: false | |
matrix: | |
test: | |
- TestWithSolverTestSuite/TestDeploy | |
name: ${{ matrix.test }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Initialize standard submodules | |
run: | | |
git submodule init | |
git submodule update --init tests/e2e/lib/forge-std | |
git submodule update --init tests/e2e/lib/openzeppelin-contracts | |
git submodule update --init tests/e2e/lib/openzeppelin-contracts-upgradeable | |
- name: Setup hyperlane-monorepo | |
run: | | |
# Add hyperlane as a subtree | |
mkdir -p tests/e2e/lib | |
git subtree add --prefix tests/e2e/lib/hyperlane-monorepo https://github.com/hyperlane-xyz/hyperlane-monorepo.git main --squash | |
cd tests/e2e/lib/hyperlane-monorepo | |
# Apply changes from secret | |
echo "${{ secrets.HYPERLANE_PATCH }}" > changes.patch | |
git apply --3way changes.patch || { | |
echo "Patch failed to apply. Showing rejects:" | |
find . -name "*.rej" -exec cat {} \; | |
exit 1 | |
} | |
rm changes.patch | |
cd solidity | |
yarn install --frozen-lockfile | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: ${{ env.FOUNDRY_VERSION }} | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.22" | |
check-latest: true | |
- name: Install dependencies and run E2E Tests | |
run: | | |
make tidy | |
make e2e-test | |
- name: Upload run-latest.json // this contains info about all the transactions that were submitted to chain in e2e test | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: e2e-test-artifacts | |
path: | | |
broadcast/**/run-latest.json | |
retention-days: 7 |