From 6f1576f52a49515a668488ebfc6afbd9cc69739e Mon Sep 17 00:00:00 2001 From: Jose Pedro Sousa Date: Fri, 25 Feb 2022 15:00:32 +0000 Subject: [PATCH 1/3] fix: building the images from the dev compose file --- .github/workflows/check-PRs.yml | 42 +++++++++++++++++++-------------- setup-nightfall | 2 +- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.github/workflows/check-PRs.yml b/.github/workflows/check-PRs.yml index f9f4683a7..121e93638 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 @@ -72,25 +74,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 &> ganache-test.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 From 40e7eb3c0b22d8b0ebb9a7db5a7ea03319da2ed0 Mon Sep 17 00:00:00 2001 From: Jose Pedro Sousa Date: Mon, 28 Feb 2022 09:08:16 +0000 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20fixing=20test-gas=20and=20adding=20w?= =?UTF-8?q?ait=20to=20ping-pong=20=F0=9F=8F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/check-PRs.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-PRs.yml b/.github/workflows/check-PRs.yml index 2a7c46510..418972eff 100644 --- a/.github/workflows/check-PRs.yml +++ b/.github/workflows/check-PRs.yml @@ -84,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 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 @@ -124,7 +128,7 @@ jobs: - name: Start Containers with ganache run: | ./setup-nightfall - ./start-nightfall -g -d &> ganache-test.log &disown + ./start-nightfall -g -d &> test-gas.log &disown env: TRANSACTIONS_PER_BLOCK: 32 From 7f1122ab720819032d45e7072a61ac7972db8a51 Mon Sep 17 00:00:00 2001 From: Jose Pedro Sousa Date: Mon, 28 Feb 2022 10:23:56 +0000 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20fixing=20test-gas=20and=20adding=20w?= =?UTF-8?q?ait=20to=20ping-pong=20=F0=9F=8F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/check-PRs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-PRs.yml b/.github/workflows/check-PRs.yml index 418972eff..6da5ebdbd 100644 --- a/.github/workflows/check-PRs.yml +++ b/.github/workflows/check-PRs.yml @@ -89,7 +89,7 @@ jobs: with: command: | docker ps - docker wait pong_deployer_1 + docker wait ping-pong_deployer_1 attempt_limit: 100 attempt_delay: 20000