Skip to content

Commit

Permalink
chore: remove services
Browse files Browse the repository at this point in the history
  • Loading branch information
npty committed Jul 8, 2024
1 parent d42f55a commit 542e1c8
Showing 1 changed file with 6 additions and 41 deletions.
47 changes: 6 additions & 41 deletions .github/workflows/test-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,11 @@ on: pull_request
jobs:
test-core:
runs-on: ubuntu-latest
services:
evm-node-1:
image: ghcr.io/foundry-rs/foundry
ports:
- "8545:8545"
options: >-
--entrypoint "anvil --port 8545 --host 0.0.0.0"
evm-node-2:
image: ghcr.io/foundry-rs/foundry
ports:
- "8546:8546"
options: >-
--entrypoint "anvil --port 8546 --host 0.0.0.0"
steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 16

- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -35,38 +22,16 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Output evm-node-1 logs
run: |
CONTAINER_ID=$(docker ps -q --filter "ancestor=ghcr.io/foundry-rs/foundry" --filter "publish=8545")
if [ -n "$CONTAINER_ID" ]; then
docker logs $CONTAINER_ID
else
echo "evm-node-1 container is not running"
exit 1
fi
- name: Output evm-node-2 logs
run: |
CONTAINER_ID=$(docker ps -q --filter "ancestor=ghcr.io/foundry-rs/foundry" --filter "publish=8546")
if [ -n "$CONTAINER_ID" ]; then
docker logs $CONTAINER_ID
else
echo "evm-node-2 container is not running"
exit 1
fi
- name: Check if evm-node-1 is running
run: |
curl -sSf http://localhost:8545 || { echo "evm-node-1 is not running"; exit 1; }
- name: Check if evm-node-2 is running
run: |
curl -sSf http://localhost:8546 || { echo "evm-node-2 is not running"; exit 1; }
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Build
run: npm run build:core

- name: Test
timeout-minutes: 15
run: |
nohup sh -c "anvil -p 8545" < /dev/null &
nohup sh -c "anvil -p 8546" < /dev/null &
sleep 5
npm run test:core

0 comments on commit 542e1c8

Please sign in to comment.