From 2191dd589581a17c772754cd1b2806a7d73be5df Mon Sep 17 00:00:00 2001 From: tok-kkk Date: Tue, 31 May 2022 10:39:58 +1000 Subject: [PATCH 1/7] check the network after decoding the address --- chain/bitcoin/address.go | 3 +++ chain/dogecoin/address_test.go | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/chain/bitcoin/address.go b/chain/bitcoin/address.go index 1bed45c4..8be89372 100644 --- a/chain/bitcoin/address.go +++ b/chain/bitcoin/address.go @@ -102,6 +102,9 @@ func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAd if err != nil { return nil, fmt.Errorf("decode address: %v", err) } + if !decodedAddr.IsForNet(decoder.params) { + return nil, fmt.Errorf("address of different network") + } switch a := decodedAddr.(type) { case *btcutil.AddressPubKeyHash, *btcutil.AddressScriptHash: diff --git a/chain/dogecoin/address_test.go b/chain/dogecoin/address_test.go index e03320bb..9eb8f51a 100644 --- a/chain/dogecoin/address_test.go +++ b/chain/dogecoin/address_test.go @@ -1 +1,23 @@ package dogecoin_test + +import ( + "github.com/renproject/multichain" + "github.com/renproject/multichain/chain/bitcoin" + "github.com/renproject/multichain/chain/dogecoin" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Dogecoin", func() { + Context("when decoding segwit address", func() { + Context("when decoding an address from a different network ", func() { + It("should return an error ", func() { + addr := multichain.Address("bc1qk6yk2ctcu2pmtxfzhya692h774562vlv2g7dvl") + decoder := bitcoin.NewAddressDecoder(&dogecoin.MainNetParams) + _, err := decoder.DecodeAddress(addr) + Expect(err).To(HaveOccurred()) + }) + }) + }) +}) From 9260e1defdc878ee3c005b9bffb6b4141723a1a5 Mon Sep 17 00:00:00 2001 From: tok-kkk Date: Tue, 31 May 2022 10:46:38 +1000 Subject: [PATCH 2/7] add network check --- chain/bitcoin/utxo.go | 3 +++ chain/bitcoincash/address.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/chain/bitcoin/utxo.go b/chain/bitcoin/utxo.go index 119e5880..f8ab8627 100644 --- a/chain/bitcoin/utxo.go +++ b/chain/bitcoin/utxo.go @@ -56,6 +56,9 @@ func (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipi if err != nil { return nil, err } + if !addr.IsForNet(txBuilder.params) { + return nil, fmt.Errorf("addr of a different network") + } script, err := txscript.PayToAddrScript(addr) if err != nil { return nil, err diff --git a/chain/bitcoincash/address.go b/chain/bitcoincash/address.go index f72d3a48..26815c08 100644 --- a/chain/bitcoincash/address.go +++ b/chain/bitcoincash/address.go @@ -97,6 +97,9 @@ func (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address func (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) { // Legacy address decoding if legacyAddr, err := btcutil.DecodeAddress(string(addr), decoder.params); err == nil { + if !legacyAddr.IsForNet(decoder.params) { + return nil, fmt.Errorf("address of different network") + } switch legacyAddr.(type) { case *btcutil.AddressPubKeyHash, *btcutil.AddressScriptHash, *btcutil.AddressPubKey: return decodeLegacyAddress(addr, decoder.params) From 37711e1bfc945420945d42774ad9be4b876cb996 Mon Sep 17 00:00:00 2001 From: tok-kkk Date: Tue, 31 May 2022 10:48:21 +1000 Subject: [PATCH 3/7] add comment for the test --- chain/dogecoin/address_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/chain/dogecoin/address_test.go b/chain/dogecoin/address_test.go index 9eb8f51a..7c4c38d4 100644 --- a/chain/dogecoin/address_test.go +++ b/chain/dogecoin/address_test.go @@ -13,6 +13,7 @@ var _ = Describe("Dogecoin", func() { Context("when decoding segwit address", func() { Context("when decoding an address from a different network ", func() { It("should return an error ", func() { + // A valid bitcoin segwit address which is not a valid doge address addr := multichain.Address("bc1qk6yk2ctcu2pmtxfzhya692h774562vlv2g7dvl") decoder := bitcoin.NewAddressDecoder(&dogecoin.MainNetParams) _, err := decoder.DecodeAddress(addr) From 2d7d1f422a3280698ac5f922110896db9baa6e4e Mon Sep 17 00:00:00 2001 From: tok-kkk Date: Tue, 31 May 2022 16:34:03 +1000 Subject: [PATCH 4/7] test new terra release --- infra/terra/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/terra/Dockerfile b/infra/terra/Dockerfile index 0b83e400..e7b6ba9c 100644 --- a/infra/terra/Dockerfile +++ b/infra/terra/Dockerfile @@ -10,7 +10,7 @@ WORKDIR /app RUN git clone https://github.com/terra-money/core.git WORKDIR /app/core RUN git fetch --all -p -RUN git checkout v0.5.5 +RUN git checkout v2.0.1 RUN make install COPY run.sh /root/run.sh From 960a54377eaf90442f9541edf667d963e01658bf Mon Sep 17 00:00:00 2001 From: tok-kkk Date: Tue, 31 May 2022 16:47:49 +1000 Subject: [PATCH 5/7] disable terra tests in CI --- .github/workflows/test.yml | 248 ++++++++++++++++++------------------- infra/terra/Dockerfile | 2 +- 2 files changed, 125 insertions(+), 125 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dc5946a7..8578a27d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -366,130 +366,130 @@ jobs: -zec=true \ -timeout 1500s - test-terra: - runs-on: ubuntu-latest - env: - FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de - SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3 - steps: - - name: Set up Go 1.16 - uses: actions/setup-go@v1 - with: - go-version: 1.16 - id: go - - - name: Configure git for Private Modules - env: - TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" - - - name: Check out code into the Go module directory - uses: actions/checkout@v1 - with: - token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - submodules: recursive - - - name: Caching modules - uses: actions/cache@v1 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} - - - name: Cache extern dependencies (FFI) - id: cache-extern - uses: actions/cache@v2 - env: - cache-name: cache-externs - with: - path: .extern - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} - - # Remove apt repos that are known to break from time to time - # See https://github.com/actions/virtual-environments/issues/323 - - name: Install dependency packages - run: | - for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done - sudo apt-get update - sudo apt-get install -y build-essential - sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev - curl https://sh.rustup.rs -sSf | sh -s -- -y - source $HOME/.cargo/env - - - name: Get dependencies - run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - go get -u github.com/onsi/ginkgo/ginkgo - go get -u github.com/onsi/gomega/... - go get -u golang.org/x/lint/golint - go get -u github.com/loongy/covermerge - go get -u github.com/mattn/goveralls - go get -u github.com/xlab/c-for-go - - - name: Install dependencies (Filecoin FFI) - if: steps.cache-extern.outputs.cache-hit != 'true' - run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - cd $GITHUB_WORKSPACE - mkdir .extern && cd .extern - git clone https://github.com/filecoin-project/filecoin-ffi.git - cd filecoin-ffi - git checkout ${{ env.FILECOIN_FFI_COMMIT }} - make - - - name: Install dependencies (Solana FFI) - if: steps.cache-extern.outputs.cache-hit != 'true' - run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - cd $GITHUB_WORKSPACE/.extern - git clone https://github.com/renproject/solana-ffi.git - cd solana-ffi - git checkout ${{ env.SOLANA_FFI_COMMIT }} - eval `ssh-agent -s` - make - - - name: Run vetting - run: | - export PATH=$PATH:$(go env GOPATH)/bin - source $HOME/.cargo/env - go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi - go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi - go mod tidy - go vet ./... - - - name: Run linting - run: | - cd $GITHUB_WORKSPACE - export PATH=$PATH:$(go env GOPATH)/bin - go get -u golang.org/x/lint/golint - golint $(go list ./... | grep -v filecoin-ffi) - - - name: Run multichain infrastructure - run: | - cd $GITHUB_WORKSPACE/infra - source .env - docker-compose up -d --build terra - - - name: Sleep until the nodes are up - uses: jakejarvis/wait-action@master - with: - time: "1m" - - - name: Check on docker containers - run: docker ps -a - - - name: Run tests and report test coverage - env: - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - export PATH=$PATH:$(go env GOPATH)/bin - source ./infra/.env - cd $GITHUB_WORKSPACE - go test \ - -luna=true \ - -timeout 1500s +# test-terra: +# runs-on: ubuntu-latest +# env: +# FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de +# SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3 +# steps: +# - name: Set up Go 1.16 +# uses: actions/setup-go@v1 +# with: +# go-version: 1.16 +# id: go +# +# - name: Configure git for Private Modules +# env: +# TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} +# run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" +# +# - name: Check out code into the Go module directory +# uses: actions/checkout@v1 +# with: +# token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} +# submodules: recursive +# +# - name: Caching modules +# uses: actions/cache@v1 +# with: +# path: ~/go/pkg/mod +# key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} +# +# - name: Cache extern dependencies (FFI) +# id: cache-extern +# uses: actions/cache@v2 +# env: +# cache-name: cache-externs +# with: +# path: .extern +# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} +# +# # Remove apt repos that are known to break from time to time +# # See https://github.com/actions/virtual-environments/issues/323 +# - name: Install dependency packages +# run: | +# for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done +# sudo apt-get update +# sudo apt-get install -y build-essential +# sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev +# curl https://sh.rustup.rs -sSf | sh -s -- -y +# source $HOME/.cargo/env +# +# - name: Get dependencies +# run: | +# export PATH=$PATH:$(go env GOPATH)/bin +# source $HOME/.cargo/env +# go get -u github.com/onsi/ginkgo/ginkgo +# go get -u github.com/onsi/gomega/... +# go get -u golang.org/x/lint/golint +# go get -u github.com/loongy/covermerge +# go get -u github.com/mattn/goveralls +# go get -u github.com/xlab/c-for-go +# +# - name: Install dependencies (Filecoin FFI) +# if: steps.cache-extern.outputs.cache-hit != 'true' +# run: | +# export PATH=$PATH:$(go env GOPATH)/bin +# source $HOME/.cargo/env +# cd $GITHUB_WORKSPACE +# mkdir .extern && cd .extern +# git clone https://github.com/filecoin-project/filecoin-ffi.git +# cd filecoin-ffi +# git checkout ${{ env.FILECOIN_FFI_COMMIT }} +# make +# +# - name: Install dependencies (Solana FFI) +# if: steps.cache-extern.outputs.cache-hit != 'true' +# run: | +# export PATH=$PATH:$(go env GOPATH)/bin +# source $HOME/.cargo/env +# cd $GITHUB_WORKSPACE/.extern +# git clone https://github.com/renproject/solana-ffi.git +# cd solana-ffi +# git checkout ${{ env.SOLANA_FFI_COMMIT }} +# eval `ssh-agent -s` +# make +# +# - name: Run vetting +# run: | +# export PATH=$PATH:$(go env GOPATH)/bin +# source $HOME/.cargo/env +# go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi +# go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi +# go mod tidy +# go vet ./... +# +# - name: Run linting +# run: | +# cd $GITHUB_WORKSPACE +# export PATH=$PATH:$(go env GOPATH)/bin +# go get -u golang.org/x/lint/golint +# golint $(go list ./... | grep -v filecoin-ffi) +# +# - name: Run multichain infrastructure +# run: | +# cd $GITHUB_WORKSPACE/infra +# source .env +# docker-compose up -d --build terra +# +# - name: Sleep until the nodes are up +# uses: jakejarvis/wait-action@master +# with: +# time: "1m" +# +# - name: Check on docker containers +# run: docker ps -a +# +# - name: Run tests and report test coverage +# env: +# COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# run: | +# export PATH=$PATH:$(go env GOPATH)/bin +# source ./infra/.env +# cd $GITHUB_WORKSPACE +# go test \ +# -luna=true \ +# -timeout 1500s test-dogecoin: runs-on: ubuntu-latest diff --git a/infra/terra/Dockerfile b/infra/terra/Dockerfile index e7b6ba9c..0b83e400 100644 --- a/infra/terra/Dockerfile +++ b/infra/terra/Dockerfile @@ -10,7 +10,7 @@ WORKDIR /app RUN git clone https://github.com/terra-money/core.git WORKDIR /app/core RUN git fetch --all -p -RUN git checkout v2.0.1 +RUN git checkout v0.5.5 RUN make install COPY run.sh /root/run.sh From 487238c7cc6356a30adbb57bd0da25d642ffef0c Mon Sep 17 00:00:00 2001 From: tok-kkk Date: Tue, 31 May 2022 16:55:22 +1000 Subject: [PATCH 6/7] update to use classic terra core --- .github/workflows/test.yml | 248 ++++++++++++++++++------------------- infra/terra/Dockerfile | 2 +- 2 files changed, 125 insertions(+), 125 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8578a27d..dc5946a7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -366,130 +366,130 @@ jobs: -zec=true \ -timeout 1500s -# test-terra: -# runs-on: ubuntu-latest -# env: -# FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de -# SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3 -# steps: -# - name: Set up Go 1.16 -# uses: actions/setup-go@v1 -# with: -# go-version: 1.16 -# id: go -# -# - name: Configure git for Private Modules -# env: -# TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} -# run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" -# -# - name: Check out code into the Go module directory -# uses: actions/checkout@v1 -# with: -# token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} -# submodules: recursive -# -# - name: Caching modules -# uses: actions/cache@v1 -# with: -# path: ~/go/pkg/mod -# key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} -# -# - name: Cache extern dependencies (FFI) -# id: cache-extern -# uses: actions/cache@v2 -# env: -# cache-name: cache-externs -# with: -# path: .extern -# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} -# -# # Remove apt repos that are known to break from time to time -# # See https://github.com/actions/virtual-environments/issues/323 -# - name: Install dependency packages -# run: | -# for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done -# sudo apt-get update -# sudo apt-get install -y build-essential -# sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev -# curl https://sh.rustup.rs -sSf | sh -s -- -y -# source $HOME/.cargo/env -# -# - name: Get dependencies -# run: | -# export PATH=$PATH:$(go env GOPATH)/bin -# source $HOME/.cargo/env -# go get -u github.com/onsi/ginkgo/ginkgo -# go get -u github.com/onsi/gomega/... -# go get -u golang.org/x/lint/golint -# go get -u github.com/loongy/covermerge -# go get -u github.com/mattn/goveralls -# go get -u github.com/xlab/c-for-go -# -# - name: Install dependencies (Filecoin FFI) -# if: steps.cache-extern.outputs.cache-hit != 'true' -# run: | -# export PATH=$PATH:$(go env GOPATH)/bin -# source $HOME/.cargo/env -# cd $GITHUB_WORKSPACE -# mkdir .extern && cd .extern -# git clone https://github.com/filecoin-project/filecoin-ffi.git -# cd filecoin-ffi -# git checkout ${{ env.FILECOIN_FFI_COMMIT }} -# make -# -# - name: Install dependencies (Solana FFI) -# if: steps.cache-extern.outputs.cache-hit != 'true' -# run: | -# export PATH=$PATH:$(go env GOPATH)/bin -# source $HOME/.cargo/env -# cd $GITHUB_WORKSPACE/.extern -# git clone https://github.com/renproject/solana-ffi.git -# cd solana-ffi -# git checkout ${{ env.SOLANA_FFI_COMMIT }} -# eval `ssh-agent -s` -# make -# -# - name: Run vetting -# run: | -# export PATH=$PATH:$(go env GOPATH)/bin -# source $HOME/.cargo/env -# go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi -# go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi -# go mod tidy -# go vet ./... -# -# - name: Run linting -# run: | -# cd $GITHUB_WORKSPACE -# export PATH=$PATH:$(go env GOPATH)/bin -# go get -u golang.org/x/lint/golint -# golint $(go list ./... | grep -v filecoin-ffi) -# -# - name: Run multichain infrastructure -# run: | -# cd $GITHUB_WORKSPACE/infra -# source .env -# docker-compose up -d --build terra -# -# - name: Sleep until the nodes are up -# uses: jakejarvis/wait-action@master -# with: -# time: "1m" -# -# - name: Check on docker containers -# run: docker ps -a -# -# - name: Run tests and report test coverage -# env: -# COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# run: | -# export PATH=$PATH:$(go env GOPATH)/bin -# source ./infra/.env -# cd $GITHUB_WORKSPACE -# go test \ -# -luna=true \ -# -timeout 1500s + test-terra: + runs-on: ubuntu-latest + env: + FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de + SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3 + steps: + - name: Set up Go 1.16 + uses: actions/setup-go@v1 + with: + go-version: 1.16 + id: go + + - name: Configure git for Private Modules + env: + TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: git config --global url."https://roynalnaruto:${TOKEN}@github.com".insteadOf "https://github.com" + + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + with: + token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + submodules: recursive + + - name: Caching modules + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }} + + - name: Cache extern dependencies (FFI) + id: cache-extern + uses: actions/cache@v2 + env: + cache-name: cache-externs + with: + path: .extern + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }} + + # Remove apt repos that are known to break from time to time + # See https://github.com/actions/virtual-environments/issues/323 + - name: Install dependency packages + run: | + for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done + sudo apt-get update + sudo apt-get install -y build-essential + sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev + curl https://sh.rustup.rs -sSf | sh -s -- -y + source $HOME/.cargo/env + + - name: Get dependencies + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + go get -u github.com/onsi/ginkgo/ginkgo + go get -u github.com/onsi/gomega/... + go get -u golang.org/x/lint/golint + go get -u github.com/loongy/covermerge + go get -u github.com/mattn/goveralls + go get -u github.com/xlab/c-for-go + + - name: Install dependencies (Filecoin FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + cd $GITHUB_WORKSPACE + mkdir .extern && cd .extern + git clone https://github.com/filecoin-project/filecoin-ffi.git + cd filecoin-ffi + git checkout ${{ env.FILECOIN_FFI_COMMIT }} + make + + - name: Install dependencies (Solana FFI) + if: steps.cache-extern.outputs.cache-hit != 'true' + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + cd $GITHUB_WORKSPACE/.extern + git clone https://github.com/renproject/solana-ffi.git + cd solana-ffi + git checkout ${{ env.SOLANA_FFI_COMMIT }} + eval `ssh-agent -s` + make + + - name: Run vetting + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source $HOME/.cargo/env + go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi + go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi + go mod tidy + go vet ./... + + - name: Run linting + run: | + cd $GITHUB_WORKSPACE + export PATH=$PATH:$(go env GOPATH)/bin + go get -u golang.org/x/lint/golint + golint $(go list ./... | grep -v filecoin-ffi) + + - name: Run multichain infrastructure + run: | + cd $GITHUB_WORKSPACE/infra + source .env + docker-compose up -d --build terra + + - name: Sleep until the nodes are up + uses: jakejarvis/wait-action@master + with: + time: "1m" + + - name: Check on docker containers + run: docker ps -a + + - name: Run tests and report test coverage + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + export PATH=$PATH:$(go env GOPATH)/bin + source ./infra/.env + cd $GITHUB_WORKSPACE + go test \ + -luna=true \ + -timeout 1500s test-dogecoin: runs-on: ubuntu-latest diff --git a/infra/terra/Dockerfile b/infra/terra/Dockerfile index 0b83e400..4c7c7d95 100644 --- a/infra/terra/Dockerfile +++ b/infra/terra/Dockerfile @@ -7,7 +7,7 @@ RUN tar -C /usr/local -xzf go1.16.8.linux-amd64.tar.gz ENV PATH=$PATH:/usr/local/go/bin WORKDIR /app -RUN git clone https://github.com/terra-money/core.git +RUN git clone https://github.com/terra-money/classic-core.git WORKDIR /app/core RUN git fetch --all -p RUN git checkout v0.5.5 From 8778e5489833930197974a415507a3bfc25eabed Mon Sep 17 00:00:00 2001 From: tok-kkk Date: Tue, 31 May 2022 17:11:37 +1000 Subject: [PATCH 7/7] update dir name --- infra/terra/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/terra/Dockerfile b/infra/terra/Dockerfile index 4c7c7d95..26531852 100644 --- a/infra/terra/Dockerfile +++ b/infra/terra/Dockerfile @@ -8,7 +8,7 @@ ENV PATH=$PATH:/usr/local/go/bin WORKDIR /app RUN git clone https://github.com/terra-money/classic-core.git -WORKDIR /app/core +WORKDIR /app/classic-core RUN git fetch --all -p RUN git checkout v0.5.5 RUN make install