Skip to content

Commit

Permalink
Run integration tests on GitHub, save logs (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
vsuharnikov committed Oct 24, 2024
1 parent 7a5bb4e commit 5e0aa23
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
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 (dind)
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: 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"
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
retention-days: 14
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ trait BaseItTestSuite

ec1.start()
ec1.logPorts()
log.info(s"Last execution block: ${ec1.engineApi.getLastExecutionBlock}") // Works // TODO remove

waves1.start()
waves1.waitReady()
waves1.logPorts()
Thread.sleep(5000)
log.info(s"Last height: ${waves1.api.height}") // TODO remove
}

override protected def afterAll(): Unit = {
Expand Down

0 comments on commit 5e0aa23

Please sign in to comment.