From 06284d82df9b7408a9a56ccbbdd1f454cb43f62f Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 19:26:43 -0500 Subject: [PATCH 01/20] ics-with-user-modules --- .github/workflows/spawn-e2e.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/spawn-e2e.yaml b/.github/workflows/spawn-e2e.yaml index bb68cb5a..3320d2a4 100644 --- a/.github/workflows/spawn-e2e.yaml +++ b/.github/workflows/spawn-e2e.yaml @@ -68,4 +68,12 @@ jobs: with: id: ICS - Cosmos Hub spawn-create-cmd: ./spawn new mychain --consensus=ics --bin=appd --bypass-prompt --bech32=roll --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug + start-chain-cmd: HOME_DIR="~/.icsnetwork" CHAIN_ID="localchain-2" CLEAN=true BLOCK_TIME="2000ms" sh scripts/test_ics_node.sh & + + ics-with-user-modules: + needs: build-spawn + uses: ./.github/workflows/reusable-e2e.yaml + with: + id: ICS - Module Plugins + spawn-create-cmd: ./spawn new mychain --consensus=ics --bin=appd --bypass-prompt --bech32=roll --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug && cd mychain && spawn module new AAAAAAA && spawn module new BBBBB --ibc-middleware && make proto-gen start-chain-cmd: HOME_DIR="~/.icsnetwork" CHAIN_ID="localchain-2" CLEAN=true BLOCK_TIME="2000ms" sh scripts/test_ics_node.sh & \ No newline at end of file From b41bd48e150867599a1857d7bc12dd73e512bf1b Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 19:29:08 -0500 Subject: [PATCH 02/20] go mod tidy in make proto-gen --- simapp/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/simapp/Makefile b/simapp/Makefile index 8d6bfe35..f4f4d4c2 100644 --- a/simapp/Makefile +++ b/simapp/Makefile @@ -200,6 +200,7 @@ proto-gen: @$(protoImage) sh ./scripts/protocgen.sh # generate the stubs for the proto files from the proto directory @spawn stub-gen + @go mod tidy proto-format: @echo "Formatting Protobuf files" From f06010ca8cd20c61622edf40b1cb286b2b548fbd Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 19:33:30 -0500 Subject: [PATCH 03/20] Makefile node specific sh-testnet (ics vs staking) --- simapp/Makefile | 1 + spawn/remove_features.go | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/simapp/Makefile b/simapp/Makefile index f4f4d4c2..3caf781b 100644 --- a/simapp/Makefile +++ b/simapp/Makefile @@ -301,6 +301,7 @@ testnet: setup-testnet sh-testnet: mod-tidy CHAIN_ID="localchain-1" BLOCK_TIME="1000ms" CLEAN=true sh scripts/test_node.sh + CHAIN_ID="localchain-1" BLOCK_TIME="1000ms" CLEAN=true sh scripts/test_ics_node.sh .PHONY: setup-testnet set-testnet-configs testnet testnet-basic sh-testnet diff --git a/spawn/remove_features.go b/spawn/remove_features.go index 9d1486cb..e8b308ce 100644 --- a/spawn/remove_features.go +++ b/spawn/remove_features.go @@ -106,6 +106,13 @@ func (fc *FileContent) RemoveDisabledFeatures(cfg *NewChainConfig) { fc.RemoveStandardTestNodeScript() fc.HandleAllTagged("not-ics") // interchaintest fc.removePacketForwardTestOnly() + if fc.ContainsPath("Makefile") { + fc.RemoveLineWithAnyMatch("scripts/test_node.sh") + } + } else { + if fc.ContainsPath("Makefile") { + fc.RemoveLineWithAnyMatch("scripts/test_ics_node.sh") + } } // remove any left over `// spawntag:` comments From 460bee7b2c02bcbaa9d5600ec7c93ca4a87e7947 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 19:34:16 -0500 Subject: [PATCH 04/20] fix spawn missing cmd --- .github/workflows/spawn-e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spawn-e2e.yaml b/.github/workflows/spawn-e2e.yaml index 3320d2a4..d2530a59 100644 --- a/.github/workflows/spawn-e2e.yaml +++ b/.github/workflows/spawn-e2e.yaml @@ -75,5 +75,5 @@ jobs: uses: ./.github/workflows/reusable-e2e.yaml with: id: ICS - Module Plugins - spawn-create-cmd: ./spawn new mychain --consensus=ics --bin=appd --bypass-prompt --bech32=roll --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug && cd mychain && spawn module new AAAAAAA && spawn module new BBBBB --ibc-middleware && make proto-gen + spawn-create-cmd: ./spawn new mychain --consensus=ics --bin=appd --bypass-prompt --bech32=roll --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug && cd mychain && ./spawn module new AAAAAAA && ./spawn module new BBBBB --ibc-middleware && make proto-gen start-chain-cmd: HOME_DIR="~/.icsnetwork" CHAIN_ID="localchain-2" CLEAN=true BLOCK_TIME="2000ms" sh scripts/test_ics_node.sh & \ No newline at end of file From 7502fed0086bd190e6b6e3fbd10bd29f2a9b8389 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 19:36:44 -0500 Subject: [PATCH 05/20] ../spawn --- .github/workflows/spawn-e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spawn-e2e.yaml b/.github/workflows/spawn-e2e.yaml index d2530a59..ba5e4bd4 100644 --- a/.github/workflows/spawn-e2e.yaml +++ b/.github/workflows/spawn-e2e.yaml @@ -75,5 +75,5 @@ jobs: uses: ./.github/workflows/reusable-e2e.yaml with: id: ICS - Module Plugins - spawn-create-cmd: ./spawn new mychain --consensus=ics --bin=appd --bypass-prompt --bech32=roll --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug && cd mychain && ./spawn module new AAAAAAA && ./spawn module new BBBBB --ibc-middleware && make proto-gen + spawn-create-cmd: ./spawn new mychain --consensus=ics --bin=appd --bypass-prompt --bech32=roll --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug && cd mychain && ../spawn module new AAAAAAA && ../spawn module new BBBBB --ibc-middleware && make proto-gen start-chain-cmd: HOME_DIR="~/.icsnetwork" CHAIN_ID="localchain-2" CLEAN=true BLOCK_TIME="2000ms" sh scripts/test_ics_node.sh & \ No newline at end of file From cb98f478830dc7363973295e6abe266c6f0dbdf9 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 19:43:56 -0500 Subject: [PATCH 06/20] debugging --- .github/workflows/reusable-e2e.yaml | 8 ++++++++ .github/workflows/spawn-e2e.yaml | 3 ++- simapp/scripts/protocgen.sh | 5 ++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-e2e.yaml b/.github/workflows/reusable-e2e.yaml index 2dc1f38f..b7e1c358 100644 --- a/.github/workflows/reusable-e2e.yaml +++ b/.github/workflows/reusable-e2e.yaml @@ -13,6 +13,10 @@ on: type: string required: true description: 'The spawn command to create the chain' + spawn-extra-cmd: + type: string + required: false + description: 'Extra command to run after the chain is created' start-chain-cmd: type: string required: true @@ -70,6 +74,10 @@ jobs: - name: Spawn Gen - '${{inputs.id}}' run: ${{ inputs.spawn-create-cmd }} + - name: Spawn Extra Generation + if : ${{ inputs.spawn-extra-cmd }} + run: ${{ inputs.spawn-extra-cmd }} + - name: Build and Run '${{inputs.id}}' run: | cd mychain diff --git a/.github/workflows/spawn-e2e.yaml b/.github/workflows/spawn-e2e.yaml index ba5e4bd4..1f810876 100644 --- a/.github/workflows/spawn-e2e.yaml +++ b/.github/workflows/spawn-e2e.yaml @@ -75,5 +75,6 @@ jobs: uses: ./.github/workflows/reusable-e2e.yaml with: id: ICS - Module Plugins - spawn-create-cmd: ./spawn new mychain --consensus=ics --bin=appd --bypass-prompt --bech32=roll --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug && cd mychain && ../spawn module new AAAAAAA && ../spawn module new BBBBB --ibc-middleware && make proto-gen + spawn-create-cmd: ./spawn new mychain --consensus=ics --bin=appd --bypass-prompt --bech32=roll --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug + spawn-extra-cmd: cd mychain && ../spawn module new AAAAAAA && ../spawn module new BBBBB --ibc-middleware && make proto-gen start-chain-cmd: HOME_DIR="~/.icsnetwork" CHAIN_ID="localchain-2" CLEAN=true BLOCK_TIME="2000ms" sh scripts/test_ics_node.sh & \ No newline at end of file diff --git a/simapp/scripts/protocgen.sh b/simapp/scripts/protocgen.sh index 054f2e65..d44c1d0b 100644 --- a/simapp/scripts/protocgen.sh +++ b/simapp/scripts/protocgen.sh @@ -23,7 +23,10 @@ buf generate --template buf.gen.pulsar.yaml cd .. -cp -r $GO_MOD_PACKAGE/* ./ +ls +ls github.com +ls github.com/rollchains +cp -r "$GO_MOD_PACKAGE/"* ./ rm -rf github.com # Copy files over for dep injection From dc5437c6b66d1c91b07e3c11a7dc8222cf89fe3e Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 19:51:54 -0500 Subject: [PATCH 07/20] simplify e2e --- .github/workflows/cosmetic.yml | 35 --------- .github/workflows/release.yaml | 78 -------------------- .github/workflows/reusable-e2e.yaml | 106 ---------------------------- .github/workflows/spawn-e2e.yaml | 42 +++++------ .github/workflows/unit-test.yaml | 37 ---------- simapp/scripts/protocgen.sh | 9 ++- 6 files changed, 27 insertions(+), 280 deletions(-) delete mode 100644 .github/workflows/cosmetic.yml delete mode 100644 .github/workflows/release.yaml delete mode 100644 .github/workflows/reusable-e2e.yaml delete mode 100644 .github/workflows/unit-test.yaml diff --git a/.github/workflows/cosmetic.yml b/.github/workflows/cosmetic.yml deleted file mode 100644 index ef47e5f3..00000000 --- a/.github/workflows/cosmetic.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: chores - -on: - pull_request: - -jobs: - link-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: gaurav-nelson/github-action-markdown-link-check@1.0.15 - - typos: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Run codespell - continue-on-error: true - run: | - # .codespellrc is used - sudo apt-get install codespell -y - codespell -w --config .codespellrc - exit $? - - pr-title-format: - name: Lint PR Title - permissions: - pull-requests: read - statuses: write - contents: read - runs-on: ubuntu-latest - steps: - - uses: amannn/action-semantic-pull-request@v5.4.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 3abf5120..00000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,78 +0,0 @@ -name: "Release" - -on: - push: - tags: - - '**' - -# Test Locally with: -# goreleaser build --skip-validate --snapshot - -jobs: - goreleaser: - name: "Binary Release" - permissions: write-all - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - - - uses: actions/setup-go@v2 - with: - go-version: '1.22.3' - - - name: Clean up dist directory - run: rm -rf dist - - - name: Build - uses: goreleaser/goreleaser-action@v5 - with: - version: latest - args: build --skip-validate - - - name: Release - uses: goreleaser/goreleaser-action@v5 - if: startsWith(github.ref, 'refs/tags/') - with: - version: latest - args: release --skip-validate --clean - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - release-image: - name: "Docker Release" - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v4 - - # all lowercase ghcr registry - - run: | - DOCKER_REGISTRY=`echo "ghcr.io/${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]'` - echo "DOCKER_REGISTRY=$DOCKER_REGISTRY" >> $GITHUB_ENV - - REPO_NAME=`echo "${{ github.repository }}" | awk -F'/' '{print $2}' | tr '[:upper:]' '[:lower:]'` - echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV - - # build and publish package to ghcr (public) with codebase remaining private - - name: Log in to the Container registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - # build and push Docker image - - name: Build and push - id: build_push_image - uses: docker/build-push-action@v5 - with: - file: Dockerfile - context: . - push: true - platforms: linux/amd64 - tags: | - ${{ env.DOCKER_REGISTRY }}/spawn:latest - ${{ env.DOCKER_REGISTRY }}/spawn:${{ github.ref_name }} \ No newline at end of file diff --git a/.github/workflows/reusable-e2e.yaml b/.github/workflows/reusable-e2e.yaml deleted file mode 100644 index b7e1c358..00000000 --- a/.github/workflows/reusable-e2e.yaml +++ /dev/null @@ -1,106 +0,0 @@ -name: Run Spawn E2E - -# Chain name MUST be `mychain` using binary name `appd` - -on: - workflow_call: - inputs: - id: - type: string - required: true - description: 'ID / description of the whole thing' - spawn-create-cmd: - type: string - required: true - description: 'The spawn command to create the chain' - spawn-extra-cmd: - type: string - required: false - description: 'Extra command to run after the chain is created' - start-chain-cmd: - type: string - required: true - description: 'The command which runs the chain via the shell' - -env: - GO_VERSION: 1.22.3 - JQ_VERSION: '1.7' - JQ_FORCE: false - - -jobs: - run: - runs-on: ubuntu-latest - steps: - # === BASE SETUP === - - id: go-cache-paths - run: | - echo "::set-output name=go-build::$(go env GOCACHE)" - echo "::set-output name=go-mod::$(go env GOMODCACHE)" - - - name: 'Setup jq' - uses: dcarbone/install-jq-action@v2 - with: - version: '${{ env.JQ_VERSION }}' - force: '${{ env.JQ_FORCE }}' - - - name: Set up Go ${{ env.GO_VERSION }} - uses: actions/setup-go@v4 - with: - go-version: ${{ env.GO_VERSION }} - - - name: Go Build Cache - uses: actions/cache@v2 - with: - path: ${{ steps.go-cache-paths.outputs.go-build }} - key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} - - - name: Go Mod Cache - uses: actions/cache@v2 - with: - path: ${{ steps.go-cache-paths.outputs.go-mod }} - key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} - - # === SETUP SPAWN === - - name: Download Spawn Bin - uses: actions/download-artifact@master - with: - name: spawn - - - name: Spawn Permission - run: chmod +x ./spawn && ls -l - - # === Chain Creation & Validation === - - name: Spawn Gen - '${{inputs.id}}' - run: ${{ inputs.spawn-create-cmd }} - - - name: Spawn Extra Generation - if : ${{ inputs.spawn-extra-cmd }} - run: ${{ inputs.spawn-extra-cmd }} - - - name: Build and Run '${{inputs.id}}' - run: | - cd mychain - ${{ inputs.start-chain-cmd }} - - - name: Unit Test - '${{inputs.id}}' - run: | - cd mychain - go test ./... - - - name: Validate '${{inputs.id}}' is Running - run: | - for ((i = 1; i <= 10; i++)); do - res=`appd status --output=json | jq -r 'has("sync_info")'` - if [ "$res" == "true" ]; then - echo "Chain is running" - exit 0 - else - echo "Chain is not running" - # exit 1 - sleep 5 - fi - done - - lsof -i tcp:26657 | awk 'NR!=1 {print $2}' | xargs kill || true - exit 1 \ No newline at end of file diff --git a/.github/workflows/spawn-e2e.yaml b/.github/workflows/spawn-e2e.yaml index 1f810876..737ce935 100644 --- a/.github/workflows/spawn-e2e.yaml +++ b/.github/workflows/spawn-e2e.yaml @@ -46,29 +46,29 @@ jobs: name: spawn path: ./bin/spawn - normal-staking: - needs: build-spawn - uses: ./.github/workflows/reusable-e2e.yaml - with: - id: Proof of Stake - spawn-create-cmd: ./spawn new mychain --consensus=proof-of-stake --bypass-prompt --bech32=prefix --bin=appd --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug - start-chain-cmd: HOME_DIR="~/.simapp" CHAIN_ID="localchain-1" BLOCK_TIME="2000ms" CLEAN=true sh scripts/test_node.sh & + # normal-staking: + # needs: build-spawn + # uses: ./.github/workflows/reusable-e2e.yaml + # with: + # id: Proof of Stake + # spawn-create-cmd: ./spawn new mychain --consensus=proof-of-stake --bypass-prompt --bech32=prefix --bin=appd --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug + # start-chain-cmd: HOME_DIR="~/.simapp" CHAIN_ID="localchain-1" BLOCK_TIME="2000ms" CLEAN=true sh scripts/test_node.sh & - proof-of-authority: - needs: build-spawn - uses: ./.github/workflows/reusable-e2e.yaml - with: - id: Proof of Authority - spawn-create-cmd: ./spawn new mychain --consensus=proof-of-authority --bypass-prompt --bech32=cosmos --bin=appd --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug - start-chain-cmd: HOME_DIR="~/.simapp" CHAIN_ID="localchain-1" BLOCK_TIME="2000ms" CLEAN=true sh scripts/test_node.sh & + # proof-of-authority: + # needs: build-spawn + # uses: ./.github/workflows/reusable-e2e.yaml + # with: + # id: Proof of Authority + # spawn-create-cmd: ./spawn new mychain --consensus=proof-of-authority --bypass-prompt --bech32=cosmos --bin=appd --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug + # start-chain-cmd: HOME_DIR="~/.simapp" CHAIN_ID="localchain-1" BLOCK_TIME="2000ms" CLEAN=true sh scripts/test_node.sh & - normal-ics: - needs: build-spawn - uses: ./.github/workflows/reusable-e2e.yaml - with: - id: ICS - Cosmos Hub - spawn-create-cmd: ./spawn new mychain --consensus=ics --bin=appd --bypass-prompt --bech32=roll --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug - start-chain-cmd: HOME_DIR="~/.icsnetwork" CHAIN_ID="localchain-2" CLEAN=true BLOCK_TIME="2000ms" sh scripts/test_ics_node.sh & + # normal-ics: + # needs: build-spawn + # uses: ./.github/workflows/reusable-e2e.yaml + # with: + # id: ICS - Cosmos Hub + # spawn-create-cmd: ./spawn new mychain --consensus=ics --bin=appd --bypass-prompt --bech32=roll --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug + # start-chain-cmd: HOME_DIR="~/.icsnetwork" CHAIN_ID="localchain-2" CLEAN=true BLOCK_TIME="2000ms" sh scripts/test_ics_node.sh & ics-with-user-modules: needs: build-spawn diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml deleted file mode 100644 index 2536d93b..00000000 --- a/.github/workflows/unit-test.yaml +++ /dev/null @@ -1,37 +0,0 @@ ---- - name: unit-test - - on: - push: - - concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - - env: - GO_VERSION: 1.22.3 - - jobs: - build: - runs-on: ubuntu-latest - name: build - steps: - - uses: actions/checkout@v4 - - name: Setup go - uses: actions/setup-go@v4 - with: - go-version: ${{ env.GO_VERSION }} - - run: make install - - test: - runs-on: ubuntu-latest - name: test - steps: - - name: Install Go - uses: actions/setup-go@v4 - with: - go-version: ${{ env.GO_VERSION }} - - name: Checkout code - uses: actions/checkout@v4 - - name: Test - run: go test ./... \ No newline at end of file diff --git a/simapp/scripts/protocgen.sh b/simapp/scripts/protocgen.sh index d44c1d0b..c7350528 100644 --- a/simapp/scripts/protocgen.sh +++ b/simapp/scripts/protocgen.sh @@ -7,25 +7,28 @@ GO_MOD_PACKAGE="github.com/rollchains/spawn/simapp" echo "Generating gogo proto code" cd proto proto_dirs=$(find . -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) +echo "proto_dirs $proto_dirs" + for dir in $proto_dirs; do for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do - # this regex checks if a proto file has its go_package set to github.com/strangelove-ventures/poa/... + # this regex checks if a proto file has its go_package set to $GO_MOD_PACKAGE... # gogo proto files SHOULD ONLY be generated if this is false # we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf + echo "Proto Checking $file" if grep -q "option go_package" "$file" && grep -H -o -c "option go_package.*$GO_MOD_PACKAGE/api" "$file" | grep -q ':0$'; then buf generate --template buf.gen.gogo.yaml $file + echo "Generated gogo proto code: status: $?" fi done done echo "Generating pulsar proto code" buf generate --template buf.gen.pulsar.yaml +echo "Generated pulsar proto code: status: $?" cd .. ls -ls github.com -ls github.com/rollchains cp -r "$GO_MOD_PACKAGE/"* ./ rm -rf github.com From 7da3a701a2b40eb2a3536a857e95273f2bdb3f2a Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 19:52:49 -0500 Subject: [PATCH 08/20] re-add e2e --- .github/workflows/reusable-e2e.yaml | 106 ++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 .github/workflows/reusable-e2e.yaml diff --git a/.github/workflows/reusable-e2e.yaml b/.github/workflows/reusable-e2e.yaml new file mode 100644 index 00000000..b7e1c358 --- /dev/null +++ b/.github/workflows/reusable-e2e.yaml @@ -0,0 +1,106 @@ +name: Run Spawn E2E + +# Chain name MUST be `mychain` using binary name `appd` + +on: + workflow_call: + inputs: + id: + type: string + required: true + description: 'ID / description of the whole thing' + spawn-create-cmd: + type: string + required: true + description: 'The spawn command to create the chain' + spawn-extra-cmd: + type: string + required: false + description: 'Extra command to run after the chain is created' + start-chain-cmd: + type: string + required: true + description: 'The command which runs the chain via the shell' + +env: + GO_VERSION: 1.22.3 + JQ_VERSION: '1.7' + JQ_FORCE: false + + +jobs: + run: + runs-on: ubuntu-latest + steps: + # === BASE SETUP === + - id: go-cache-paths + run: | + echo "::set-output name=go-build::$(go env GOCACHE)" + echo "::set-output name=go-mod::$(go env GOMODCACHE)" + + - name: 'Setup jq' + uses: dcarbone/install-jq-action@v2 + with: + version: '${{ env.JQ_VERSION }}' + force: '${{ env.JQ_FORCE }}' + + - name: Set up Go ${{ env.GO_VERSION }} + uses: actions/setup-go@v4 + with: + go-version: ${{ env.GO_VERSION }} + + - name: Go Build Cache + uses: actions/cache@v2 + with: + path: ${{ steps.go-cache-paths.outputs.go-build }} + key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} + + - name: Go Mod Cache + uses: actions/cache@v2 + with: + path: ${{ steps.go-cache-paths.outputs.go-mod }} + key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} + + # === SETUP SPAWN === + - name: Download Spawn Bin + uses: actions/download-artifact@master + with: + name: spawn + + - name: Spawn Permission + run: chmod +x ./spawn && ls -l + + # === Chain Creation & Validation === + - name: Spawn Gen - '${{inputs.id}}' + run: ${{ inputs.spawn-create-cmd }} + + - name: Spawn Extra Generation + if : ${{ inputs.spawn-extra-cmd }} + run: ${{ inputs.spawn-extra-cmd }} + + - name: Build and Run '${{inputs.id}}' + run: | + cd mychain + ${{ inputs.start-chain-cmd }} + + - name: Unit Test - '${{inputs.id}}' + run: | + cd mychain + go test ./... + + - name: Validate '${{inputs.id}}' is Running + run: | + for ((i = 1; i <= 10; i++)); do + res=`appd status --output=json | jq -r 'has("sync_info")'` + if [ "$res" == "true" ]; then + echo "Chain is running" + exit 0 + else + echo "Chain is not running" + # exit 1 + sleep 5 + fi + done + + lsof -i tcp:26657 | awk 'NR!=1 {print $2}' | xargs kill || true + exit 1 \ No newline at end of file From f2f9801cef7a6ac305d6fe339f2fbbcf51195ca9 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 22:30:56 -0500 Subject: [PATCH 09/20] try new proto-gen --- simapp/scripts/protocgen.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simapp/scripts/protocgen.sh b/simapp/scripts/protocgen.sh index c7350528..0f712191 100644 --- a/simapp/scripts/protocgen.sh +++ b/simapp/scripts/protocgen.sh @@ -15,7 +15,8 @@ for dir in $proto_dirs; do # gogo proto files SHOULD ONLY be generated if this is false # we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf echo "Proto Checking $file" - if grep -q "option go_package" "$file" && grep -H -o -c "option go_package.*$GO_MOD_PACKAGE/api" "$file" | grep -q ':0$'; then + # if grep -q "option go_package" "$file" && grep -H -o -c "option go_package.*$GO_MOD_PACKAGE/api" "$file" | grep -q ':0$'; then + if grep -q "option go_package" "$file" && grep -H -o -c 'option go_package.*cosmossdk.io/api' "$file" | grep -q ':0$'; then buf generate --template buf.gen.gogo.yaml $file echo "Generated gogo proto code: status: $?" fi From 7a0b899b594a28c61c5560e4373cfe6a75856406 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 22:34:21 -0500 Subject: [PATCH 10/20] simpler --- simapp/scripts/protocgen.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simapp/scripts/protocgen.sh b/simapp/scripts/protocgen.sh index 0f712191..44b58760 100644 --- a/simapp/scripts/protocgen.sh +++ b/simapp/scripts/protocgen.sh @@ -16,9 +16,9 @@ for dir in $proto_dirs; do # we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf echo "Proto Checking $file" # if grep -q "option go_package" "$file" && grep -H -o -c "option go_package.*$GO_MOD_PACKAGE/api" "$file" | grep -q ':0$'; then - if grep -q "option go_package" "$file" && grep -H -o -c 'option go_package.*cosmossdk.io/api' "$file" | grep -q ':0$'; then + if grep -q "option go_package" "$file" | grep -q ':0$'; then buf generate --template buf.gen.gogo.yaml $file - echo "Generated gogo proto code: status: $?" + echo "Generated gogo proto code: file: $file status: $?" fi done done From ff26d1e212d8dceb85244aa18bdc018afd69174f Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 22:39:11 -0500 Subject: [PATCH 11/20] simpler --- simapp/scripts/protocgen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simapp/scripts/protocgen.sh b/simapp/scripts/protocgen.sh index 44b58760..fdebe84c 100644 --- a/simapp/scripts/protocgen.sh +++ b/simapp/scripts/protocgen.sh @@ -16,7 +16,7 @@ for dir in $proto_dirs; do # we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf echo "Proto Checking $file" # if grep -q "option go_package" "$file" && grep -H -o -c "option go_package.*$GO_MOD_PACKAGE/api" "$file" | grep -q ':0$'; then - if grep -q "option go_package" "$file" | grep -q ':0$'; then + if grep -q "option go_package" "$file"; then buf generate --template buf.gen.gogo.yaml $file echo "Generated gogo proto code: file: $file status: $?" fi From 1596a05d9123645cd8be6c2ad166f71910ad260c Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 22:46:42 -0500 Subject: [PATCH 12/20] idk now --- simapp/scripts/protocgen.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simapp/scripts/protocgen.sh b/simapp/scripts/protocgen.sh index fdebe84c..1d8ea042 100644 --- a/simapp/scripts/protocgen.sh +++ b/simapp/scripts/protocgen.sh @@ -16,10 +16,10 @@ for dir in $proto_dirs; do # we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf echo "Proto Checking $file" # if grep -q "option go_package" "$file" && grep -H -o -c "option go_package.*$GO_MOD_PACKAGE/api" "$file" | grep -q ':0$'; then - if grep -q "option go_package" "$file"; then + # if grep -q "option go_package" "$file"; then buf generate --template buf.gen.gogo.yaml $file echo "Generated gogo proto code: file: $file status: $?" - fi + # fi done done From ce014b2b141e4b67b7e25c392ae1977f9463c522 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 22:54:48 -0500 Subject: [PATCH 13/20] please for all sake of humanity work, Github CI i beg of you. this 1 final time for the night. --- simapp/scripts/protocgen.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/simapp/scripts/protocgen.sh b/simapp/scripts/protocgen.sh index 1d8ea042..319f6c4e 100644 --- a/simapp/scripts/protocgen.sh +++ b/simapp/scripts/protocgen.sh @@ -17,9 +17,15 @@ for dir in $proto_dirs; do echo "Proto Checking $file" # if grep -q "option go_package" "$file" && grep -H -o -c "option go_package.*$GO_MOD_PACKAGE/api" "$file" | grep -q ':0$'; then # if grep -q "option go_package" "$file"; then - buf generate --template buf.gen.gogo.yaml $file - echo "Generated gogo proto code: file: $file status: $?" - # fi + + # module/v1 use `import "cosmos/app/v1alpha1/module.proto";` + if grep -q "module.proto" "$file"; then + echo "Skipping module.proto file: $file" + continue + fi + + echo "Generated gogo proto code: file: $file" + buf generate --template buf.gen.gogo.yaml $file done done From 60363fb01968532eca900066b2f8dec0549bc5ff Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 23:10:44 -0500 Subject: [PATCH 14/20] ssh-debug --- .github/workflows/reusable-e2e.yaml | 10 +++++++ simapp/scripts/protocgen.sh | 41 ++++++++++++++++------------- 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/.github/workflows/reusable-e2e.yaml b/.github/workflows/reusable-e2e.yaml index b7e1c358..b31a16f0 100644 --- a/.github/workflows/reusable-e2e.yaml +++ b/.github/workflows/reusable-e2e.yaml @@ -78,6 +78,16 @@ jobs: if : ${{ inputs.spawn-extra-cmd }} run: ${{ inputs.spawn-extra-cmd }} + - uses: actions/checkout@v2 + - name: Setup upterm session + uses: lhotari/action-upterm@v1 + with: + ## limits ssh access and adds the ssh public key for the user which triggered the workflow + limit-access-to-actor: true + ## limits ssh access and adds the ssh public keys of the listed GitHub users + limit-access-to-users: reecepbcups + wait-timeout-minutes: 2 + - name: Build and Run '${{inputs.id}}' run: | cd mychain diff --git a/simapp/scripts/protocgen.sh b/simapp/scripts/protocgen.sh index 319f6c4e..ffdd040e 100644 --- a/simapp/scripts/protocgen.sh +++ b/simapp/scripts/protocgen.sh @@ -33,31 +33,34 @@ echo "Generating pulsar proto code" buf generate --template buf.gen.pulsar.yaml echo "Generated pulsar proto code: status: $?" +ls cd .. - ls -cp -r "$GO_MOD_PACKAGE/"* ./ -rm -rf github.com -# Copy files over for dep injection -rm -rf api && mkdir api -custom_modules=$(find . -name 'module' -type d -not -path "./proto/*") +# TODO: remove this after debugging out issues + +# cp -r "$GO_MOD_PACKAGE/"* ./ +# rm -rf github.com + +# # Copy files over for dep injection +# rm -rf api && mkdir api +# custom_modules=$(find . -name 'module' -type d -not -path "./proto/*") -# get the 1 up directory (so ./cosmos/mint/module becomes ./cosmos/mint) -# remove the relative path starter from base namespaces. so ./cosmos/mint becomes cosmos/mint -base_namespace=$(echo $custom_modules | sed -e 's|/module||g' | sed -e 's|\./||g') +# # get the 1 up directory (so ./cosmos/mint/module becomes ./cosmos/mint) +# # remove the relative path starter from base namespaces. so ./cosmos/mint becomes cosmos/mint +# base_namespace=$(echo $custom_modules | sed -e 's|/module||g' | sed -e 's|\./||g') -# echo "Base namespace: $base_namespace" -for module in $base_namespace; do - echo " [+] Moving: ./$module to ./api/$module" +# # echo "Base namespace: $base_namespace" +# for module in $base_namespace; do +# echo " [+] Moving: ./$module to ./api/$module" - mkdir -p api/$module +# mkdir -p api/$module - mv $module/* ./api/$module/ +# mv $module/* ./api/$module/ - # # incorrect reference to the module for coins - find api/$module -type f -name '*.go' -exec sed -i -e 's|types "github.com/cosmos/cosmos-sdk/types"|types "cosmossdk.io/api/cosmos/base/v1beta1"|g' {} \; - find api/$module -type f -name '*.go' -exec sed -i -e 's|types1 "github.com/cosmos/cosmos-sdk/x/bank/types"|types1 "cosmossdk.io/api/cosmos/bank/v1beta1"|g' {} \; +# # # incorrect reference to the module for coins +# find api/$module -type f -name '*.go' -exec sed -i -e 's|types "github.com/cosmos/cosmos-sdk/types"|types "cosmossdk.io/api/cosmos/base/v1beta1"|g' {} \; +# find api/$module -type f -name '*.go' -exec sed -i -e 's|types1 "github.com/cosmos/cosmos-sdk/x/bank/types"|types1 "cosmossdk.io/api/cosmos/bank/v1beta1"|g' {} \; - rm -rf $module -done \ No newline at end of file +# rm -rf $module +# done \ No newline at end of file From 096a01b20b3e125a34e1ec85b5fce7d80da833d6 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 23:14:44 -0500 Subject: [PATCH 15/20] pre debug --- .github/workflows/reusable-e2e.yaml | 12 +++++++----- simapp/scripts/protocgen.sh | 4 ++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-e2e.yaml b/.github/workflows/reusable-e2e.yaml index b31a16f0..9196b7f6 100644 --- a/.github/workflows/reusable-e2e.yaml +++ b/.github/workflows/reusable-e2e.yaml @@ -68,16 +68,12 @@ jobs: name: spawn - name: Spawn Permission - run: chmod +x ./spawn && ls -l + run: chmod +x ./spawn && ls -l && echo $PATH # === Chain Creation & Validation === - name: Spawn Gen - '${{inputs.id}}' run: ${{ inputs.spawn-create-cmd }} - - name: Spawn Extra Generation - if : ${{ inputs.spawn-extra-cmd }} - run: ${{ inputs.spawn-extra-cmd }} - - uses: actions/checkout@v2 - name: Setup upterm session uses: lhotari/action-upterm@v1 @@ -88,6 +84,12 @@ jobs: limit-access-to-users: reecepbcups wait-timeout-minutes: 2 + - name: Spawn Extra Generation + if : ${{ inputs.spawn-extra-cmd }} + run: ${{ inputs.spawn-extra-cmd }} + + + - name: Build and Run '${{inputs.id}}' run: | cd mychain diff --git a/simapp/scripts/protocgen.sh b/simapp/scripts/protocgen.sh index ffdd040e..c237aeb4 100644 --- a/simapp/scripts/protocgen.sh +++ b/simapp/scripts/protocgen.sh @@ -33,9 +33,13 @@ echo "Generating pulsar proto code" buf generate --template buf.gen.pulsar.yaml echo "Generated pulsar proto code: status: $?" +echo "before" ls cd .. +echo "after" ls +echo "above anotehr" +ls ../ # TODO: remove this after debugging out issues From 2202a6a65783791c319d587211bbafa68516ed7f Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 23:18:16 -0500 Subject: [PATCH 16/20] remove reduce --- .github/workflows/reusable-e2e.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/reusable-e2e.yaml b/.github/workflows/reusable-e2e.yaml index 9196b7f6..d1771947 100644 --- a/.github/workflows/reusable-e2e.yaml +++ b/.github/workflows/reusable-e2e.yaml @@ -78,10 +78,6 @@ jobs: - name: Setup upterm session uses: lhotari/action-upterm@v1 with: - ## limits ssh access and adds the ssh public key for the user which triggered the workflow - limit-access-to-actor: true - ## limits ssh access and adds the ssh public keys of the listed GitHub users - limit-access-to-users: reecepbcups wait-timeout-minutes: 2 - name: Spawn Extra Generation From 3d9404071948dba62ff3bb22ef8f9bc89c9feb0e Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 23:29:04 -0500 Subject: [PATCH 17/20] try git config hack --- .github/workflows/reusable-e2e.yaml | 17 ++++++++++------- .github/workflows/spawn-e2e.yaml | 4 ++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-e2e.yaml b/.github/workflows/reusable-e2e.yaml index d1771947..b5012e3c 100644 --- a/.github/workflows/reusable-e2e.yaml +++ b/.github/workflows/reusable-e2e.yaml @@ -66,26 +66,29 @@ jobs: uses: actions/download-artifact@master with: name: spawn + # in the runner path + path: /home/runner/go/bin - name: Spawn Permission - run: chmod +x ./spawn && ls -l && echo $PATH + run: chmod +x /home/runner/go/bin/spawn # === Chain Creation & Validation === - name: Spawn Gen - '${{inputs.id}}' run: ${{ inputs.spawn-create-cmd }} + - name: Spawn Extra Generation + if : ${{ inputs.spawn-extra-cmd }} + run: | + # fixes `could not read Username for 'https://github.com': terminal prompts disabled` error from make proto-gen + git config --global --add url."git@github.com:".insteadOf "https://github.com/" + ${{ inputs.spawn-extra-cmd }} + - uses: actions/checkout@v2 - name: Setup upterm session uses: lhotari/action-upterm@v1 with: wait-timeout-minutes: 2 - - name: Spawn Extra Generation - if : ${{ inputs.spawn-extra-cmd }} - run: ${{ inputs.spawn-extra-cmd }} - - - - name: Build and Run '${{inputs.id}}' run: | cd mychain diff --git a/.github/workflows/spawn-e2e.yaml b/.github/workflows/spawn-e2e.yaml index 737ce935..b6274223 100644 --- a/.github/workflows/spawn-e2e.yaml +++ b/.github/workflows/spawn-e2e.yaml @@ -75,6 +75,6 @@ jobs: uses: ./.github/workflows/reusable-e2e.yaml with: id: ICS - Module Plugins - spawn-create-cmd: ./spawn new mychain --consensus=ics --bin=appd --bypass-prompt --bech32=roll --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug - spawn-extra-cmd: cd mychain && ../spawn module new AAAAAAA && ../spawn module new BBBBB --ibc-middleware && make proto-gen + spawn-create-cmd: spawn new mychain --consensus=ics --bin=appd --bypass-prompt --bech32=roll --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug + spawn-extra-cmd: cd mychain && spawn module new AAAAAAA && spawn module new BBBBB --ibc-middleware && make proto-gen start-chain-cmd: HOME_DIR="~/.icsnetwork" CHAIN_ID="localchain-2" CLEAN=true BLOCK_TIME="2000ms" sh scripts/test_ics_node.sh & \ No newline at end of file From 3a1577e53669cde42418cd643dc81f9d7ee0f809 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 23:44:01 -0500 Subject: [PATCH 18/20] e2e: just 1 module, cleanup script --- .github/workflows/spawn-e2e.yaml | 4 +- .../ibcmiddleware/module/v1/module.proto | 2 +- simapp/scripts/protocgen.sh | 54 ++++++++----------- 3 files changed, 24 insertions(+), 36 deletions(-) diff --git a/.github/workflows/spawn-e2e.yaml b/.github/workflows/spawn-e2e.yaml index b6274223..a80d92ea 100644 --- a/.github/workflows/spawn-e2e.yaml +++ b/.github/workflows/spawn-e2e.yaml @@ -75,6 +75,6 @@ jobs: uses: ./.github/workflows/reusable-e2e.yaml with: id: ICS - Module Plugins - spawn-create-cmd: spawn new mychain --consensus=ics --bin=appd --bypass-prompt --bech32=roll --no-git --org=rollchains-org --denom=uroll --debug --log-level=debug - spawn-extra-cmd: cd mychain && spawn module new AAAAAAA && spawn module new BBBBB --ibc-middleware && make proto-gen + spawn-create-cmd: spawn new mychain --consensus=ics --bin=appd --bypass-prompt --bech32=roll --org=rollchains-org --denom=uroll --debug --log-level=debug + spawn-extra-cmd: cd mychain && spawn module new aaaaaa && make proto-gen start-chain-cmd: HOME_DIR="~/.icsnetwork" CHAIN_ID="localchain-2" CLEAN=true BLOCK_TIME="2000ms" sh scripts/test_ics_node.sh & \ No newline at end of file diff --git a/simapp/proto/ibcmiddleware/module/v1/module.proto b/simapp/proto/ibcmiddleware/module/v1/module.proto index 8eba1463..e08ae94d 100644 --- a/simapp/proto/ibcmiddleware/module/v1/module.proto +++ b/simapp/proto/ibcmiddleware/module/v1/module.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package strangelove_ventures.simapp.ibcmiddleware.module.v1; +package ibcmiddleware.module.v1; import "cosmos/app/v1alpha1/module.proto"; diff --git a/simapp/scripts/protocgen.sh b/simapp/scripts/protocgen.sh index c237aeb4..310c4f17 100644 --- a/simapp/scripts/protocgen.sh +++ b/simapp/scripts/protocgen.sh @@ -4,27 +4,22 @@ set -e GO_MOD_PACKAGE="github.com/rollchains/spawn/simapp" -echo "Generating gogo proto code" cd proto proto_dirs=$(find . -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) -echo "proto_dirs $proto_dirs" - for dir in $proto_dirs; do for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do # this regex checks if a proto file has its go_package set to $GO_MOD_PACKAGE... # gogo proto files SHOULD ONLY be generated if this is false # we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf - echo "Proto Checking $file" - # if grep -q "option go_package" "$file" && grep -H -o -c "option go_package.*$GO_MOD_PACKAGE/api" "$file" | grep -q ':0$'; then - # if grep -q "option go_package" "$file"; then # module/v1 use `import "cosmos/app/v1alpha1/module.proto";` + # if grep -q "option go_package" "$file" && grep -H -o -c "option go_package.*$GO_MOD_PACKAGE/api" "$file" | grep -q ':0$'; then if grep -q "module.proto" "$file"; then echo "Skipping module.proto file: $file" continue fi - echo "Generated gogo proto code: file: $file" + echo "Generated proto code: file: $file" buf generate --template buf.gen.gogo.yaml $file done done @@ -33,38 +28,31 @@ echo "Generating pulsar proto code" buf generate --template buf.gen.pulsar.yaml echo "Generated pulsar proto code: status: $?" -echo "before" -ls +# back to the root of the directory cd .. -echo "after" -ls -echo "above anotehr" -ls ../ - -# TODO: remove this after debugging out issues -# cp -r "$GO_MOD_PACKAGE/"* ./ -# rm -rf github.com +cp -r $GO_MOD_PACKAGE/* ./ +rm -rf github.com -# # Copy files over for dep injection -# rm -rf api && mkdir api -# custom_modules=$(find . -name 'module' -type d -not -path "./proto/*") +# Copy files over for dep injection +rm -rf api && mkdir api +custom_modules=$(find . -name 'module' -type d -not -path "./proto/*") -# # get the 1 up directory (so ./cosmos/mint/module becomes ./cosmos/mint) -# # remove the relative path starter from base namespaces. so ./cosmos/mint becomes cosmos/mint -# base_namespace=$(echo $custom_modules | sed -e 's|/module||g' | sed -e 's|\./||g') +# get the 1 up directory (so ./cosmos/mint/module becomes ./cosmos/mint) +# remove the relative path starter from base namespaces. so ./cosmos/mint becomes cosmos/mint +base_namespace=$(echo $custom_modules | sed -e 's|/module||g' | sed -e 's|\./||g') -# # echo "Base namespace: $base_namespace" -# for module in $base_namespace; do -# echo " [+] Moving: ./$module to ./api/$module" +# echo "Base namespace: $base_namespace" +for module in $base_namespace; do + echo " [+] Moving: ./$module to ./api/$module" -# mkdir -p api/$module + mkdir -p api/$module -# mv $module/* ./api/$module/ + mv $module/* ./api/$module/ -# # # incorrect reference to the module for coins -# find api/$module -type f -name '*.go' -exec sed -i -e 's|types "github.com/cosmos/cosmos-sdk/types"|types "cosmossdk.io/api/cosmos/base/v1beta1"|g' {} \; -# find api/$module -type f -name '*.go' -exec sed -i -e 's|types1 "github.com/cosmos/cosmos-sdk/x/bank/types"|types1 "cosmossdk.io/api/cosmos/bank/v1beta1"|g' {} \; + # # incorrect reference to the module for coins + find api/$module -type f -name '*.go' -exec sed -i -e 's|types "github.com/cosmos/cosmos-sdk/types"|types "cosmossdk.io/api/cosmos/base/v1beta1"|g' {} \; + find api/$module -type f -name '*.go' -exec sed -i -e 's|types1 "github.com/cosmos/cosmos-sdk/x/bank/types"|types1 "cosmossdk.io/api/cosmos/bank/v1beta1"|g' {} \; -# rm -rf $module -# done \ No newline at end of file + rm -rf $module +done \ No newline at end of file From 4f990f2a9985bd5adf1777ffde5fc111ff7346c6 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Sun, 30 Jun 2024 23:52:40 -0500 Subject: [PATCH 19/20] ci --- .github/workflows/reusable-e2e.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-e2e.yaml b/.github/workflows/reusable-e2e.yaml index b5012e3c..a8eea25c 100644 --- a/.github/workflows/reusable-e2e.yaml +++ b/.github/workflows/reusable-e2e.yaml @@ -76,6 +76,13 @@ jobs: - name: Spawn Gen - '${{inputs.id}}' run: ${{ inputs.spawn-create-cmd }} + - uses: actions/checkout@v2 + - name: Setup upterm session + uses: lhotari/action-upterm@v1 + with: + wait-timeout-minutes: 2 + limit-access-to-users: reecepbcups + - name: Spawn Extra Generation if : ${{ inputs.spawn-extra-cmd }} run: | @@ -83,11 +90,7 @@ jobs: git config --global --add url."git@github.com:".insteadOf "https://github.com/" ${{ inputs.spawn-extra-cmd }} - - uses: actions/checkout@v2 - - name: Setup upterm session - uses: lhotari/action-upterm@v1 - with: - wait-timeout-minutes: 2 + - name: Build and Run '${{inputs.id}}' run: | From 6c7b9ea9c90376239a87afaa757fa09c8ff9b8af Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Mon, 1 Jul 2024 00:12:05 -0500 Subject: [PATCH 20/20] idk man :\ --- .github/workflows/reusable-e2e.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-e2e.yaml b/.github/workflows/reusable-e2e.yaml index a8eea25c..2271e593 100644 --- a/.github/workflows/reusable-e2e.yaml +++ b/.github/workflows/reusable-e2e.yaml @@ -74,7 +74,12 @@ jobs: # === Chain Creation & Validation === - name: Spawn Gen - '${{inputs.id}}' - run: ${{ inputs.spawn-create-cmd }} + run: | + git config --global --add url."git@github.com:".insteadOf "https://github.com/" + git config --global user.email "you@example.com" + git config --global user.name "Your Name" + ${{ inputs.spawn-create-cmd }} + pwd - uses: actions/checkout@v2 - name: Setup upterm session @@ -85,10 +90,7 @@ jobs: - name: Spawn Extra Generation if : ${{ inputs.spawn-extra-cmd }} - run: | - # fixes `could not read Username for 'https://github.com': terminal prompts disabled` error from make proto-gen - git config --global --add url."git@github.com:".insteadOf "https://github.com/" - ${{ inputs.spawn-extra-cmd }} + run: ${{ inputs.spawn-extra-cmd }}