diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dcd791169756..8c317ca22c89 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -493,7 +493,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: "1.12" + go-version: "1.22" cache: true cache-dependency-path: indexer/postgres/tests/go.sum - uses: technote-space/get-diff-action@v6.1.2 @@ -509,11 +509,11 @@ jobs: if: env.GIT_DIFF run: | cd indexer/postgres - go test -mod=readonly -timeout 30m -coverprofile=cov1.out -covermode=atomic ./... + go test -mod=readonly -timeout 30m -coverprofile=cov.out -covermode=atomic ./... cd tests - go test -mod=readonly -timeout 30m -coverprofile=cov2.out -covermode=atomic -coverpkg=cosmossdk.io/indexer/postgres ./... + go test -mod=readonly -timeout 30m -coverprofile=cov.out -covermode=atomic -coverpkg=cosmossdk.io/indexer/postgres ./... cd .. - go run github.com/dylandreimerink/gocovmerge/cmd/gocovmerge@latest cov1.out tests/cov2.out > coverage.out + go run github.com/dylandreimerink/gocovmerge/cmd/gocovmerge@latest cov.out tests/cov.out > coverage.out - name: sonarcloud if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }} uses: SonarSource/sonarcloud-github-action@master diff --git a/indexer/postgres/create_table_test.go b/indexer/postgres/create_table_test.go index a62a19929723..1edfae4fbc01 100644 --- a/indexer/postgres/create_table_test.go +++ b/indexer/postgres/create_table_test.go @@ -7,7 +7,7 @@ import ( "cosmossdk.io/schema" ) -func ExampleCreateTable_AllKinds() { +func ExampleTableManager_CreateTableSql_allKinds() { exampleCreateTable(testdata.AllKindsObject) // Output: // CREATE TABLE IF NOT EXISTS "test_all_kinds" ("id" BIGINT NOT NULL, @@ -37,7 +37,7 @@ func ExampleCreateTable_AllKinds() { // GRANT SELECT ON TABLE "test_all_kinds" TO PUBLIC; } -func ExampleCreateTable_Singleton() { +func ExampleTableManager_CreateTableSql_singleton() { exampleCreateTable(testdata.SingletonObject) // Output: // CREATE TABLE IF NOT EXISTS "test_singleton" (_id INTEGER NOT NULL CHECK (_id = 1), diff --git a/indexer/postgres/enum_test.go b/indexer/postgres/enum_test.go index 157ee8e6cf7d..22d8870171c3 100644 --- a/indexer/postgres/enum_test.go +++ b/indexer/postgres/enum_test.go @@ -6,7 +6,7 @@ import ( "cosmossdk.io/indexer/postgres/internal/testdata" ) -func ExampleCreateEnumType() { +func ExampleCreateEnumTypeSql() { err := CreateEnumTypeSql(os.Stdout, "test", testdata.MyEnum) if err != nil { panic(err)