Skip to content

Commit

Permalink
Merge branch 'main' into tuan/refactor-test-helper
Browse files Browse the repository at this point in the history
  • Loading branch information
tuantran1702 authored May 3, 2024
2 parents 9403b87 + fb8ab2a commit 39e0198
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ jobs:
cli:
name: Test CLI
needs: [setup]
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: set up go
Expand Down
12 changes: 10 additions & 2 deletions cmd/rollkit/commands/run_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"math/rand"
"net/url"
"os"
"time"

cmtcmd "github.com/cometbft/cometbft/cmd/cometbft/commands"
cometconf "github.com/cometbft/cometbft/config"
Expand Down Expand Up @@ -167,11 +168,18 @@ func NewRunNodeCmd() *cobra.Command {
return err
}
if !inCI {
// Block forever
// Block forever to force user to stop node
select {}
}

return nil
// CI mode. Wait for 5s and then verify the node is running before calling stop node.
time.Sleep(5 * time.Second)
if !rollnode.IsRunning() {
return fmt.Errorf("node is not running")

}

return rollnode.Stop()
},
}

Expand Down

0 comments on commit 39e0198

Please sign in to comment.