From 878115adc5a5811fbfe98890077e34e11f9833e1 Mon Sep 17 00:00:00 2001 From: Juraj Piar Date: Thu, 9 May 2024 12:41:47 +0100 Subject: [PATCH] using mining tests fork --- .github/workflows/build_and_test.yml | 60 +++++++++++++++++++++------- 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 8c3239816fb..71b44c88235 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -167,42 +167,72 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Setup System Tools - run: | - sudo apt-get update -y - sudo apt-get install -y jq lsof +# - name: Setup System Tools +# run: | +# sudo apt-get update -y +# sudo apt-get install -y jq lsof - name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: - node-version: '12' + node-version: '21.x' - name: Check Node.js version run: node --version - name: Checkout Mining Integration Tests Repository uses: actions/checkout@v2 with: - repository: rsksmart/mining-integration-tests + repository: jurajpiar/mining-integration-tests # ref: ${{ secrets.MINING_INTEGRATION_TESTS_REF }} # token: ${{ secrets.GITHUB_TOKEN }} path: mining-integration-tests - name: Start bitcoin containers - uses: docker://docker - with: - args: | - docker compose --file mining-integration-tests/docker-compose.yml up -d + run: | + sudo docker compose --file mining-integration-tests/docker-compose.yml up -d - name: Wait for Bitcoin nodes to initialize run: sleep 30 - - name: Test bitcoin nodes + - name: Check bitcoin nodes + uses: docker://docker + with: + args: | + docker ps -a + - name: Check bitcoind1 logs + uses: docker://docker + with: + args: | + docker logs bitcoind1 + - name: Check bitcoind2 logs + uses: docker://docker + with: + args: | + docker logs bitcoind2 + + - name: Test bitcoin node 1 as localhost + if: always() run: | echo Test bitcoin node 1 curl -v -s -u admin:admin --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://localhost:32591 + - name: Test bitcoin nodes as bitcoind1 + if: always() + run: | + echo Test bitcoin node 1 + curl -v -s -u admin:admin --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://bitcoind1:32591 + + - name: Test bitcoin node 2 as localhost + if: always() + run: | echo Test bitcoin node 2 curl -v -s -u admin:admin --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://localhost:32592 + - name: Test bitcoin nodes as bitcoind2 + if: always() + run: | + echo Test bitcoin node 2 + curl -v -s -u admin:admin --data-binary '{"jsonrpc":"1.0","id":"curltext","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://bitcoind2:32592 + # - uses: actions/cache@v2 # with: # path: | @@ -232,7 +262,7 @@ jobs: node --unhandled-rejections=strict generateBtcBlocks.js - name: Setup Java JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' @@ -299,5 +329,5 @@ jobs: if: always() with: args: | - docker stop bitcoind01 bitcoind02 - docker rm bitcoind01 bitcoind02 \ No newline at end of file + docker stop bitcoind1 bitcoind2 + docker rm bitcoind1 bitcoind2 \ No newline at end of file