diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index a8a841b..742dcd4 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -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 @@ -35,33 +22,8 @@ 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 @@ -69,4 +31,7 @@ jobs: - 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