diff --git a/.github/workflows/docs-deploy-preview.yml b/.github/workflows/docs-deploy-preview.yml index 2c47806878..6edc4350a4 100644 --- a/.github/workflows/docs-deploy-preview.yml +++ b/.github/workflows/docs-deploy-preview.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3.4.0 + uses: actions/checkout@v4 - name: Cache node_modules uses: actions/cache@v3 diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index 46fca6ce9e..5205bf930f 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -15,11 +15,11 @@ jobs: build_and_deploy: runs-on: ubuntu-latest - needs: [consecutiveness] + needs: [ consecutiveness ] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cache node_modules uses: actions/cache@v3 diff --git a/.github/workflows/gen-docs-cli.yml b/.github/workflows/gen-docs-cli.yml index 2c53a5c34a..8acfc37489 100644 --- a/.github/workflows/gen-docs-cli.yml +++ b/.github/workflows/gen-docs-cli.yml @@ -9,18 +9,18 @@ jobs: cli: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: 'stable' - name: Generate CLI Docs run: ./scripts/gen-cli-docs - name: Create Pull Request id: cpr - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v6 with: title: "docs(cli): update generated docs" commit-message: "docs(cli): update generated docs" diff --git a/.github/workflows/gen-docs-version.yml b/.github/workflows/gen-docs-version.yml index fddd7d1708..3b5ea175e5 100644 --- a/.github/workflows/gen-docs-version.yml +++ b/.github/workflows/gen-docs-version.yml @@ -1,14 +1,14 @@ name: Docusaurus add version on: release: - types: [published] + types: [ published ] jobs: gen-docs-version: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cache node_modules uses: actions/cache@v3 @@ -47,7 +47,7 @@ jobs: working-directory: ./docs - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 + uses: peter-evans/create-pull-request@v6 with: title: "chore: docusaurus deploy version ${{ github.ref_name }}" commit-message: "chore(docs): deploy version ${{ github.ref_name }}" diff --git a/.github/workflows/go-formatting.yml b/.github/workflows/go-formatting.yml index 340ebf5d9d..15d1d9246d 100644 --- a/.github/workflows/go-formatting.yml +++ b/.github/workflows/go-formatting.yml @@ -1,7 +1,7 @@ name: Go formatting on: push: - branches: [main] + branches: [ main ] paths: - '**.go' @@ -10,18 +10,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: 'stable' - name: Run make format run: make format - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v6 with: title: "chore: go formatting" commit-message: "chore: go formatting" diff --git a/.github/workflows/md-link-checker.yml b/.github/workflows/md-link-checker.yml index cbe6df9577..42ebab4fb1 100644 --- a/.github/workflows/md-link-checker.yml +++ b/.github/workflows/md-link-checker.yml @@ -18,7 +18,7 @@ jobs: markdown-link-check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.4.0 + - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6.1.2 with: PATTERNS: | diff --git a/.github/workflows/proto-checker.yml b/.github/workflows/proto-checker.yml index 1abdd37c38..cbb576a3fd 100644 --- a/.github/workflows/proto-checker.yml +++ b/.github/workflows/proto-checker.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: bufbuild/buf-setup-action@v1.22.0 - uses: bufbuild/buf-lint-action@v1 with: diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index eeff8c13de..1c2268bc20 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -2,7 +2,7 @@ name: Release Binaries on: release: - types: [published] + types: [ published ] concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -16,12 +16,12 @@ jobs: steps: - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: 'stable' - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ${{ env.working-directory }} fetch-depth: 0 diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml index 64c86edbf7..32db38deec 100644 --- a/.github/workflows/release-docker.yml +++ b/.github/workflows/release-docker.yml @@ -2,7 +2,7 @@ name: Release Docker Image on: release: - types: [published] + types: [ published ] schedule: - cron: "0 0 * * *" # every day at midnight @@ -34,11 +34,11 @@ jobs: name: Push Docker image to Docker Hub if: needs.check-latest-run.outputs.last_sha != github.sha runs-on: ubuntu-latest - needs: [consecutiveness, check-latest-run] + needs: [ consecutiveness, check-latest-run ] steps: - name: Check out the repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index 468c8942b0..58453eae09 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -32,12 +32,12 @@ jobs: release-nightly: if: needs.check-latest-run.outputs.last_sha != github.sha runs-on: ubuntu-latest - needs: [consecutiveness, check-latest-run] + needs: [ consecutiveness, check-latest-run ] env: working-directory: go/src/github.com/ignite/cli steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Delete the nightly release uses: dev-drprasad/delete-tag-and-release@v0.2.1 @@ -65,14 +65,14 @@ jobs: releases-binaries: if: needs.check-latest-run.outputs.last_sha != github.sha name: Release Go Binary - needs: [consecutiveness, check-latest-run] + needs: [ consecutiveness, check-latest-run ] runs-on: ubuntu-latest strategy: matrix: - goos: [linux, darwin] - goarch: [amd64, arm64] + goos: [ linux, darwin ] + goarch: [ amd64, arm64 ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: wangyoucao577/go-release-action@v1.43 with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-snapcraft.yml b/.github/workflows/release-snapcraft.yml index 84eb9b185a..419e404e7f 100644 --- a/.github/workflows/release-snapcraft.yml +++ b/.github/workflows/release-snapcraft.yml @@ -2,7 +2,7 @@ name: Publish Ignite to Snapcraft on: release: - types: [published] + types: [ published ] concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -14,9 +14,9 @@ jobs: steps: - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: 'stable' - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 28144b2c41..3eefba33ba 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -19,7 +19,7 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - uses: actions/checkout@v3.4.0 + - uses: actions/checkout@v4 - name: Finding files and store to output id: set-matrix run: echo "matrix=$({ cd integration && find . -type d ! -name testdata -maxdepth 1 -print; } | tail -n +2 | cut -c 3- | jq -R . | jq -cs .)" >> $GITHUB_OUTPUT @@ -33,10 +33,10 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest, macos-latest] + os: [ ubuntu-latest, macos-latest ] test-path: ${{fromJson(needs.pre-test.outputs.matrix)}} steps: - - uses: actions/checkout@v3.4.0 + - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6.1.2 with: PATTERNS: | @@ -47,7 +47,7 @@ jobs: go.sum **/testdata/** - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 if: env.GIT_DIFF with: go-version: 'stable' diff --git a/.github/workflows/test-lint.yml b/.github/workflows/test-lint.yml index 5bc184f1dc..5643dda4eb 100644 --- a/.github/workflows/test-lint.yml +++ b/.github/workflows/test-lint.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 6 steps: - - uses: actions/checkout@v3.4.0 + - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6.1.2 with: PATTERNS: | @@ -28,13 +28,13 @@ jobs: go.mod go.sum - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 if: env.GIT_DIFF with: go-version-file: go.mod cache: false - - uses: golangci/golangci-lint-action@v3 + - uses: golangci/golangci-lint-action@v4 if: env.GIT_DIFF with: version: v1.54.2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c666cab26e..24feb61b9e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ ubuntu-latest, macos-latest ] steps: - uses: actions/checkout@v4 - uses: technote-space/get-diff-action@v6.1.2 @@ -33,7 +33,7 @@ jobs: - uses: actions/setup-go@v5 if: env.GIT_DIFF with: - go-version: "1.22" + go-version: 'stable' cache: true cache-dependency-path: go.sum diff --git a/changelog.md b/changelog.md index 8bfc636aa0..e07bbbae02 100644 --- a/changelog.md +++ b/changelog.md @@ -27,6 +27,7 @@ - [#3969](https://github.com/ignite/cli/pull/3969) Get first config validator using a getter to avoid index errors - [#4000](https://github.com/ignite/cli/pull/4000) Run all dry runners before the wet run in the `xgenny` pkg +- [#4086](https://github.com/ignite/cli/pull/4086) Retry to get the IBC balance if it fails the first time ## [`v28.3.0`](https://github.com/ignite/cli/releases/tag/v28.3.0) diff --git a/docs/docs/08-references/01-cli.md b/docs/docs/08-references/01-cli.md index e436137d8e..68fd236ac3 100644 --- a/docs/docs/08-references/01-cli.md +++ b/docs/docs/08-references/01-cli.md @@ -11,7 +11,7 @@ Ignite CLI offers everything you need to scaffold, test, build, and launch your **Synopsis** -Ignite CLI is a tool for creating sovereign blockchains built with Cosmos SDK, the world’s +Ignite CLI is a tool for creating sovereign blockchains built with Cosmos SDK, the world's most popular modular blockchain framework. Ignite CLI offers everything you need to scaffold, test, build, and launch your blockchain. diff --git a/ignite/internal/tools/gen-cli-docs/main.go b/ignite/internal/tools/gen-cli-docs/main.go index 7076da90bb..0883b1736b 100644 --- a/ignite/internal/tools/gen-cli-docs/main.go +++ b/ignite/internal/tools/gen-cli-docs/main.go @@ -6,7 +6,6 @@ import ( "bufio" "bytes" "context" - "flag" "fmt" "io" "log" @@ -23,7 +22,8 @@ import ( "github.com/ignite/cli/v29/ignite/services/plugin" ) -const head = `--- +const ( + head = `--- description: Ignite CLI docs. --- @@ -31,16 +31,16 @@ description: Ignite CLI docs. Documentation for Ignite CLI. ` + outFlag = "out" +) func main() { - outPath := flag.String("out", ".", ".md file path to place Ignite CLI docs inside") - flag.Parse() - if err := run(*outPath); err != nil { + if err := run(); err != nil { log.Fatal(err) } } -func run(outPath string) error { +func run() error { // We want to have documentation for commands that are implemented in plugins. // To do that, we need to add the related plugins in the config. // To avoid conflicts with user config, set an alternate config dir in tmp. @@ -71,6 +71,8 @@ func run(outPath string) error { return err } defer cleanUp() + cmd.Flags().String(outFlag, ".", ".md file path to place Ignite CLI docs inside") + cmd.Flags().MarkHidden(outFlag) // Run ExecuteC so cobra adds the completion command. cmd, err = cmd.ExecuteC() @@ -78,6 +80,11 @@ func run(outPath string) error { return err } + outPath, err := cmd.Flags().GetString(outFlag) + if err != nil { + return nil + } + return generate(cmd, outPath) } diff --git a/ignite/templates/app/files/.github/workflows/release.yml b/ignite/templates/app/files/.github/workflows/release.yml index 0d472b4284..2ceabd4d34 100644 --- a/ignite/templates/app/files/.github/workflows/release.yml +++ b/ignite/templates/app/files/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/integration/ibc/cmd_relayer_test.go b/integration/relayer/cmd_relayer_test.go similarity index 97% rename from integration/ibc/cmd_relayer_test.go rename to integration/relayer/cmd_relayer_test.go index caeb189f52..f51ee6ff45 100644 --- a/integration/ibc/cmd_relayer_test.go +++ b/integration/relayer/cmd_relayer_test.go @@ -1,6 +1,6 @@ //go:build !relayer -package ibc_test +package relayer_test import ( "bytes" @@ -434,7 +434,7 @@ func TestBlogIBC(t *testing.T) { "install", "-g", // filepath.Join(goenv.GoPath(), "src/github.com/ignite/apps/hermes"), // Local path for test proposals - "github.com/ignite/apps/hermes", + "github.com/ignite/apps/hermes@hermes/v0.2.1", ), )), )) @@ -584,7 +584,7 @@ func TestBlogIBC(t *testing.T) { balanceOutput = &bytes.Buffer{} balanceResponse QueryBalances ) - env.Must(env.Exec("check ibc balance", step.NewSteps( + steps := step.NewSteps( step.New( step.Stdout(balanceOutput), step.Exec( @@ -595,6 +595,7 @@ func TestBlogIBC(t *testing.T) { receiverAddr, "--node", marsRPC, "--home", marsHome, + "--chain-id", marsChainID, "--log_format", "json", "--output", "json", ), @@ -602,8 +603,11 @@ func TestBlogIBC(t *testing.T) { if execErr != nil { return execErr } - if err := json.Unmarshal(balanceOutput.Bytes(), &balanceResponse); err != nil { - return fmt.Errorf("unmarshalling tx response: %w", err) + + output := balanceOutput.Bytes() + defer balanceOutput.Reset() + if err := json.Unmarshal(output, &balanceResponse); err != nil { + return fmt.Errorf("unmarshalling query response error: %w, response: %s", err, string(output)) } if balanceResponse.Balances.Empty() { return fmt.Errorf("empty balances") @@ -611,10 +615,12 @@ func TestBlogIBC(t *testing.T) { if !strings.HasPrefix(balanceResponse.Balances[0].Denom, "ibc/") { return fmt.Errorf("invalid ibc balance: %v", balanceResponse.Balances[0]) } + return nil }), ), - ))) + ) + env.Must(env.Exec("check ibc balance", steps, envtest.ExecRetry())) // TODO test ibc using the blog post methods: // step.Exec(app.Binary(), "tx", "blog", "send-ibc-post", "transfer", "channel-0", "Hello", "Hello_Mars-Alice_from_Earth", "--chain-id", earthChainID, "--from", "alice", "--node", earthGRPC, "--output", "json", "--log_format", "json", "--yes")