Skip to content

Commit

Permalink
Merge pull request #8 from srdtrk/serdar/xxx-e2e
Browse files Browse the repository at this point in the history
feat(e2e): added an e2e suite
  • Loading branch information
gjermundgaraba authored Aug 1, 2024
2 parents ea66332 + b6bb877 commit 52e6ea9
Show file tree
Hide file tree
Showing 42 changed files with 10,756 additions and 56 deletions.
13 changes: 3 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
export API_KEY_ALCHEMY="YOUR_API_KEY_ALCHEMY"
export API_KEY_ARBISCAN="YOUR_API_KEY_ARBISCAN"
export API_KEY_BSCSCAN="YOUR_API_KEY_BSCSCAN"
export API_KEY_ETHERSCAN="YOUR_API_KEY_ETHERSCAN"
export API_KEY_GNOSISSCAN="YOUR_API_KEY_GNOSISSCAN"
export API_KEY_INFURA="YOUR_API_KEY_INFURA"
export API_KEY_OPTIMISTIC_ETHERSCAN="YOUR_API_KEY_OPTIMISTIC_ETHERSCAN"
export API_KEY_POLYGONSCAN="YOUR_API_KEY_POLYGONSCAN"
export API_KEY_SNOWTRACE="YOUR_API_KEY_SNOWTRACE"
# Mnemonic used in base script (not e2e)
export MNEMONIC="YOUR_MNEMONIC"
export FOUNDRY_PROFILE="default"
# Private key with the permission to use the network prover
SP1_PRIVATE_KEY="PRIVATE_KEY"
69 changes: 69 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: e2e
on:
push:
branches: [main]
pull_request:
paths:
- '**.rs'
- '**.go'
- '**.toml'
- '**.lock'
- '**.mod'
- '**.sum'
- '**.sol'
- '.github/workflows/e2e.yml'
env:
FOUNDRY_PROFILE: ci
permissions:
contents: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.22"
cache-dependency-path: 'e2e/interchaintestv8/go.sum'

- uses: actions/checkout@v4

- name: golangci-lint
uses: golangci/[email protected]
with:
version: v1.59
args: --timeout 5m
working-directory: e2e/interchaintestv8
e2e:
strategy:
fail-fast: false
matrix:
test:
# List your tests here
- TestWithIbcEurekaTestSuite/TestDeploy
name: ${{ matrix.test }}
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.22"
check-latest: true
cache-dependency-path: "e2e/interchaintestv8/go.sum"

- name: "Install Bun"
uses: "oven-sh/setup-bun@v2"

- name: "Install the Node.js dependencies"
run: bun install

- name: Run Tests
env:
SP1_PRIVATE_KEY: ${{ secrets.SP1_PRIVATE_KEY }}
run: |
cd e2e/interchaintestv8
go test -v -mod=readonly . -run=${{ matrix.test }} -timeout 40m
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml → .github/workflows/foundry.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CI"
name: "foundry"

env:
API_KEY_ALCHEMY: ${{ secrets.API_KEY_ALCHEMY }}
Expand All @@ -13,6 +13,7 @@ on:

jobs:
lint:
name: "lint"
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
Expand All @@ -22,20 +23,21 @@ jobs:
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Install Bun"
uses: "oven-sh/setup-bun@v1"
uses: "oven-sh/setup-bun@v2"

- name: "Install the Node.js dependencies"
run: "bun install"

- name: "Lint the code"
run: "bun run lint"
run: "bun run lint:sol"

- name: "Add lint summary"
run: |
echo "## Lint result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
build:
name: "build"
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
Expand All @@ -45,7 +47,7 @@ jobs:
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Install Bun"
uses: "oven-sh/setup-bun@v1"
uses: "oven-sh/setup-bun@v2"

- name: "Install the Node.js dependencies"
run: "bun install"
Expand All @@ -59,6 +61,7 @@ jobs:
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
test:
name: "test"
needs: ["lint", "build"]
runs-on: "ubuntu-latest"
steps:
Expand All @@ -69,7 +72,7 @@ jobs:
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Install Bun"
uses: "oven-sh/setup-bun@v1"
uses: "oven-sh/setup-bun@v2"

- name: "Install the Node.js dependencies"
run: "bun install"
Expand Down
Loading

0 comments on commit 52e6ea9

Please sign in to comment.