Skip to content

Commit

Permalink
chore: try fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
npty committed Jul 8, 2024
1 parent 6e5608e commit a1a6bcb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/test-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ jobs:
ports:
- "8545:8545"
options: >-
--expose 8545
--entrypoint anvil -- --host 0.0.0.0 -p 8545
--entrypoint anvil
evm-node-2:
image: ghcr.io/foundry-rs/foundry
ports:
- "8546:8546"
- "8546:8545"
options: >-
--expose 8546
--entrypoint anvil -- --host 0.0.0.0 -p 8546
--entrypoint anvil
steps:
- name: Setup Node
uses: actions/setup-node@v4
Expand All @@ -48,20 +46,8 @@ jobs:

- name: Test
timeout-minutes: 15
env:
EVM_NODE_1: evm-node-1:8545
EVM_NODE_2: evm-node-2:8546
run: |
apt-get update
apt-get install curl -y
echo "Checking EVM node 1 (8545)"
curl -v -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' http://localhost:8545
echo "\n\nChecking EVM node 2 (8546)"
curl -v -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' http://localhost:8546
echo "\n\nTrying with 127.0.0.1 instead of localhost"
curl -v -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' http://127.0.0.1:8545
echo "\n\nChecking if curl can reach other services"
curl -v http://example.com
echo "\n\nDocker logs for Anvil containers"
docker logs $(docker ps -q --filter "ancestor=ghcr.io/foundry-rs/foundry:latest")
echo "\n\nRunning tests"
# curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' http://127.0.0.1:8545
npm run test:core
4 changes: 2 additions & 2 deletions packages/axelar-local-dev/src/__tests__/export.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ describe('export', () => {
chains: [
{
name: 'Ethereum',
rpcUrl: 'http://127.0.0.1:8545',
rpcUrl: process.env.EVM_NODE_1 || 'http://127.0.0.1:8545',
},
{
name: 'Avalanche',
rpcUrl: 'http://127.0.0.1:8546',
rpcUrl: process.env.EVM_NODE_2 || 'http://127.0.0.1:8546',
},
],
})) as Network[];
Expand Down

0 comments on commit a1a6bcb

Please sign in to comment.