From a20f3bce011b6ffe4d21c9b93415b008a3137d07 Mon Sep 17 00:00:00 2001 From: Vyatcheslav Suharnikov Date: Wed, 23 Oct 2024 14:56:00 +0400 Subject: [PATCH] Run integration tests on GitHub (WIP) --- .github/workflows/check-pr.yml | 17 ++++++++++++++++- .../scala/units/network/BaseItTestSuite.scala | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index 3c3b2246..c45b73fc 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -6,6 +6,15 @@ jobs: check-pr: name: Check PR runs-on: ubuntu-latest + + services: + docker: + image: docker:latest + options: --privileged # Required for Docker-in-Docker (dind) + volumes: + - /var/run/docker.sock:/var/run/docker.sock + ports: + - 2375:2375 steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 @@ -13,5 +22,11 @@ jobs: distribution: 'temurin' java-version: '11' cache: 'sbt' + # - uses: sbt/setup-sbt@v1 + # - name: Install dependencies + # # testcontainers uses nc: + # # https://github.com/testcontainers/testcontainers-java/blob/main/core/src/main/java/org/testcontainers/containers/wait/internal/InternalCommandPortListeningCheck.java#L33 + # run: sudo apt-get update && sudo apt-get install -y netcat - name: Check PR - run: sbt --batch "compile;test" + run: sbt --batch "docker;consensus-client-it/test" + # 10:59:19.028 WARN [ers-wait-0] o.t.c.w.i.InternalCommandPortListeningCheck - An exception while executing the internal check: Container.ExecResult(exitCode=137, stdout=, stderr=/bin/sh: 1: nc: not found \ No newline at end of file diff --git a/consensus-client-it/src/test/scala/units/network/BaseItTestSuite.scala b/consensus-client-it/src/test/scala/units/network/BaseItTestSuite.scala index ced811b6..a751f36b 100644 --- a/consensus-client-it/src/test/scala/units/network/BaseItTestSuite.scala +++ b/consensus-client-it/src/test/scala/units/network/BaseItTestSuite.scala @@ -43,6 +43,7 @@ trait BaseItTestSuite ec1.start() ec1.logPorts() + log.info(s"Last execution block: ${ec1.engineApi.getLastExecutionBlock}") // TODO remove waves1.start() waves1.waitReady()