Skip to content

Commit

Permalink
chore: run misc/docker-integration from the CI (#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
moul authored and peter7891 committed May 9, 2023
1 parent 81fd3eb commit 4d6040e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/gnoland.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,14 @@ jobs:
run: |
export GOPATH=$HOME/go
make ${{ matrix.args }}
docker-integration:
strategy:
fail-fast: false
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
# TODO: setup docker caching
- run: make test.docker
- run: docker logs int_gnoland || true
11 changes: 7 additions & 4 deletions misc/docker-integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ import (
const (
gnolandContainerName = "int_gnoland"

test1Addr = "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"
test1Seed = "source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast"
test1Addr = "g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5"
test1Seed = "source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast"
dockerWaitTimeout = 30
)

func TestDockerIntegration(t *testing.T) {
Expand Down Expand Up @@ -162,17 +163,19 @@ func startGnoland(t *testing.T) {
func waitGnoland(t *testing.T) {
t.Helper()
t.Log("waiting...")
for {
for i := 0; i < dockerWaitTimeout; i++ {
output, _ := createCommand(t,
[]string{"docker", "logs", gnolandContainerName},
).CombinedOutput()
if strings.Contains(string(output), "Committed state") {
// ok blockchain is ready
t.Log("gnoland ready")
break
return
}
time.Sleep(time.Second)
}
// cleanupGnoland(t)
panic("gnoland start timeout")
}

func cleanupGnoland(t *testing.T) {
Expand Down

0 comments on commit 4d6040e

Please sign in to comment.