diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index 3c3b2246..20d2b140 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -6,6 +6,16 @@ jobs: check-pr: name: Check PR runs-on: ubuntu-latest + env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + services: + docker: + image: docker:latest + options: --privileged # Required for Docker-in-Docker + volumes: + - /var/run/docker.sock:/var/run/docker.sock + ports: + - 2375:2375 steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 @@ -13,5 +23,18 @@ jobs: distribution: 'temurin' java-version: '11' cache: 'sbt' + - uses: sbt/setup-sbt@v1 + - name: Generate genesis.conf + run: | + cd local-network + sh genesis-update.sh - name: Check PR - run: sbt --batch "compile;test" + run: sbt --batch "docker;consensus-client-it/test" + - name: Archive logs + uses: actions/upload-artifact@v4 + if: always() + with: + name: test-logs_${{ env.BRANCH_NAME }}_${{ github.run_id }} + path: consensus-client-it/target/test-logs + if-no-files-found: warn + retention-days: 14 diff --git a/consensus-client-it/build.sbt b/consensus-client-it/build.sbt index d93cfa82..b446338a 100644 --- a/consensus-client-it/build.sbt +++ b/consensus-client-it/build.sbt @@ -29,9 +29,6 @@ inConfig(Test)( testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-fFWD", ((Test / logsDirectory).value / "summary.log").toString), parallelExecution := true, testGrouping := { - val PORTS_PER_TEST = 50 - val DEFAULT_PORT_RANGE = (10000, 32000) - val javaHomeValue = (test / javaHome).value val logDirectoryValue = (Test / logsDirectory).value val envVarsValue = (Test / envVars).value diff --git a/consensus-client-it/src/test/resources/logback-test.xml b/consensus-client-it/src/test/resources/logback-test.xml index ce24c467..a7ce880b 100644 --- a/consensus-client-it/src/test/resources/logback-test.xml +++ b/consensus-client-it/src/test/resources/logback-test.xml @@ -22,12 +22,11 @@ - + - - + diff --git a/consensus-client-it/src/test/scala/com/wavesplatform/api/NodeHttpApi.scala b/consensus-client-it/src/test/scala/com/wavesplatform/api/NodeHttpApi.scala index 94625b8f..4b3b468e 100644 --- a/consensus-client-it/src/test/scala/com/wavesplatform/api/NodeHttpApi.scala +++ b/consensus-client-it/src/test/scala/com/wavesplatform/api/NodeHttpApi.scala @@ -34,7 +34,7 @@ class NodeHttpApi(apiUri: Uri, backend: SttpBackend[Identity, ?]) extends Scorex if (currHeight >= atLeast) currHeight else WithRetries( - maxAttempts = (averageBlockDelay.toSeconds.toInt * (atLeast - currHeight) * 1.5).toInt, + maxAttempts = (averageBlockDelay.toSeconds.toInt * (atLeast - currHeight) * 2.5).toInt, message = s"waitForHeight($atLeast)" ).until(height) { case h if h >= atLeast => h diff --git a/local-network/_debug/besu/Dockerfile b/local-network/_debug/besu/Dockerfile deleted file mode 100644 index c3c297ab..00000000 --- a/local-network/_debug/besu/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM hyperledger/besu:develop - -USER root - -RUN apt-get update && apt-get install -y \ - curl \ - netcat \ - iproute2 - -USER besu diff --git a/local-network/configs/besu/besu.yml b/local-network/configs/besu/besu.yml index 95b693d8..e683f057 100644 --- a/local-network/configs/besu/besu.yml +++ b/local-network/configs/besu/besu.yml @@ -1,6 +1,6 @@ services: besu: - image: hyperledger/besu:latest # Debug version: besu-debug:latest , see _debug/ + image: hyperledger/besu:latest volumes: - ../ec-common/genesis.json:/genesis.json:ro - .:/config:ro