Skip to content

Commit

Permalink
Run integration tests on GitHub, save logs
Browse files Browse the repository at this point in the history
  • Loading branch information
vsuharnikov committed Oct 24, 2024
1 parent 7a5bb4e commit c9a4753
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 19 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,35 @@ 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
with:
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
3 changes: 0 additions & 3 deletions consensus-client-it/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions consensus-client-it/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@
</encoder>
</appender>

<!-- Retries logs -->
<!-- TestContainers logs -->
<logger name="org.rnorth.ducttape.unreliables" level="WARN"/>

<!-- Docker logs -->
<logger name="com.github.dockerjava" level="WARN"/>
<logger name="org.testcontainers" level="WARN"/>
<logger name="org.testcontainers.utility" level="ERROR"/>

<root level="TRACE">
<appender-ref ref="STDOUT"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 0 additions & 10 deletions local-network/_debug/besu/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion local-network/configs/besu/besu.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit c9a4753

Please sign in to comment.