diff --git a/.github/workflows/check-PRs.yml b/.github/workflows/check-PRs.yml index 3d0639e54..6da5ebdbd 100644 --- a/.github/workflows/check-PRs.yml +++ b/.github/workflows/check-PRs.yml @@ -2,8 +2,7 @@ name: Check PR on: pull_request: - branch: - - master + branches: [master] jobs: eslint-check: @@ -28,25 +27,28 @@ jobs: - name: Start Containers run: | - docker build --no-cache -t ghcr.io/eyblockchain/local-zokrates -f zokrates.Dockerfile . - docker-compose build + ./setup-nightfall ./start-nightfall -g -d &> ganache-test.log &disown - - name: debug logs - after container startup + - name: Wait for images to be ready + uses: Wandalen/wretry.action@v1.0.11 + with: + command: | + docker wait nightfall_3_deployer_1 + attempt_limit: 100 + attempt_delay: 20000 + + - name: Debug logs - after image builds if: always() run: cat ganache-test.log - - name: wait 1200s for Containers startup and setup completion - run: sleep 1200 - - name: Run integration test run: | npm ci - docker wait nightfall_3_deployer_1 VERBOSE=true npm run test-e2e-protocol VERBOSE=true npm run test-e2e-tokens - - name: debug logs - after integration test run + - name: Debug logs - after integration test run if: always() run: cat ganache-test.log @@ -82,13 +84,17 @@ jobs: if: always() run: cat test/ping-pong/ping-pong-test.log - - name: wait 1200s for Containers startup and setup completion - run: sleep 1200 + - name: Wait for images to be ready + uses: Wandalen/wretry.action@v1.0.11 + with: + command: | + docker ps + docker wait ping-pong_deployer_1 + attempt_limit: 100 + attempt_delay: 20000 - name: Run ping-pong test run: | - docker ps - docker wait ping-pong_deployer_1 cd test/ping-pong ./pong-apps @@ -121,25 +127,29 @@ jobs: - name: Start Containers with ganache run: | - docker build --no-cache -t ghcr.io/eyblockchain/local-zokrates -f zokrates.Dockerfile . - docker-compose build - ./start-nightfall -g &> test-gas.log &disown + ./setup-nightfall + ./start-nightfall -g -d &> test-gas.log &disown env: TRANSACTIONS_PER_BLOCK: 32 - - name: wait 1500s for Containers startup and setup completion - run: sleep 1500 + - name: Wait for images to be ready + uses: Wandalen/wretry.action@v1.0.11 + with: + command: | + docker wait nightfall_3_deployer_1 + attempt_limit: 100 + attempt_delay: 20000 - - name: debug logs - after container startup + - name: Debug logs - after container startup if: always() run: cat test-gas.log - name: Run tx-gas.mjs test suites run: | npm ci - npm run test-gas + VERBOSE=true npm run test-gas - - name: debug logs - after integration test run + - name: Debug logs - after integration test run if: always() run: cat test-gas.log diff --git a/setup-nightfall b/setup-nightfall index 75151655f..2aa8da9f2 100755 --- a/setup-nightfall +++ b/setup-nightfall @@ -3,4 +3,4 @@ # Install node dependencies npm ci docker build --no-cache -t ghcr.io/eyblockchain/local-zokrates -f zokrates.Dockerfile . -docker-compose build --no-cache +docker-compose -f docker-compose.yml -f docker-compose.dev.yml build --no-cache