From a5c642a644e07ca38bd7f3df106411e2bac49b84 Mon Sep 17 00:00:00 2001 From: Kevin Davis Date: Mon, 14 Oct 2019 17:04:21 -0400 Subject: [PATCH 1/3] fix: json formatting of genesis state --- Makefile | 5 +++-- x/validator-vesting/internal/types/genesis.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ed080a2a..146a1d9e 100644 --- a/Makefile +++ b/Makefile @@ -108,5 +108,6 @@ test-all: build @# AppStateDeterminism does use Seed flag @go test ./app -run TestAppStateDeterminism -Enabled -Commit -NumBlocks=100 -BlockSize=200 -v -timeout 24h - -.PHONY: all build-linux install clean build test-all \ No newline at end of file +test: + @go test ./... +.PHONY: all build-linux install clean build test-all test \ No newline at end of file diff --git a/x/validator-vesting/internal/types/genesis.go b/x/validator-vesting/internal/types/genesis.go index 69007b44..aef83708 100644 --- a/x/validator-vesting/internal/types/genesis.go +++ b/x/validator-vesting/internal/types/genesis.go @@ -10,7 +10,7 @@ import ( // GenesisState - all auth state that must be provided at genesis type GenesisState struct { - PreviousBlockTime time.Time + PreviousBlockTime time.Time `json:"previous_block_time" yaml:"previous_block_time"` } // NewGenesisState - Create a new genesis state From 6a0f325e35cabdd95670202337c833b51a59d8a5 Mon Sep 17 00:00:00 2001 From: Kevin Davis Date: Tue, 15 Oct 2019 11:35:51 -0400 Subject: [PATCH 2/3] add circleci config --- .circleci/config.yml | 122 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..4d815c0e --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,122 @@ +version 2.1 + +executors: + golang: + docker: + - image: circleci/golang:1.13 + +commands: + make: + parameters: + description: + type: string + target: + type: string + steps: + - attach_workspace: + at: /tmp/workspace + - restore_cache: + name: "Restore source code cache" + keys: + - go-src-v1-{{ .Revision }} + - checkout + - restore_cache: + name: "Restore go modules cache" + keys: + - go-mod-v2-{{ checksum "go.sum" }} + - run: + name: << parameters.description >> + cammnd: | + make << parameters.target >> + +jobs: + setup-dependencies: + executor: golang + steps: + - checkout + - restore_cache: + name: "Restore go modules cache" + keys: + - go-mod-v2-{{ checksum "go.sum" }} + - run: + name: Cache go modules + command: make go-mod-cache + - run: + name: Build + command: make build + - run: + name: Git garbage collection + command: git gc + - save_cache: + name: "Save go modules cache" + key: go-mod-v2-{{ checksum "go.sum" }} + paths: + - "/go/pkg/mod" + - save_cache: + name: "Save source code cache" + key: go-src-v1-{{ .Revision }} + paths: + - ".git" + test-cover: + executor: golang + parallelism: 4 + steps: + - checkout + - restore_cache: + keys: + - go-mod-v2-{{ checksum "go.sum" }} + - run: + name: Run tests + command: | + export VERSION="$(git describe --tags --long | sed 's/v\(.*\)/\1/')" + export GO111MODULE=on + mkdir -p /tmp/logs /tmp/workspace/profiles + for pkg in $(go list ./... | grep -v '/simulation' | circleci tests split); do + id=$(echo "$pkg" | sed 's|[/.]|_|g') + go test -mod=readonly -timeout 8m -race -coverprofile=/tmp/workspace/profiles/$id.out -covermode=atomic -tags='ledger test_ledger_mock' "$pkg" | tee "/tmp/logs/$id-$RANDOM.log" + done + - persist_to_workspace: + root: /tmp/workspace + paths: + - "profiles/*" + - store_artifacts: + path: /tmp/logs + + test-all: + executor: golang + steps: + - make: + target: test-all + description: "Run all tests and simulations" + + start-remote-sims: + executor: golang + steps: + - make: + target: start-remote-sims + description: "Test multi-seed simulation (long)" + + +workflows: + version: 2 + test-suite: + jobs: + - setup-dependencies: + # This filter enables the job for tags + filters: + tags: + only: + - /^v.*/ + - test-cover: + requires: + - setup-dependencies + - test-all: + requires: + - setup-dependencies + # These filters ensure that the long sim only runs during release + filters: + branches: + ignore: /.*/ + tags: + only: + - /^v.*/ \ No newline at end of file From b70e34da0d372fcc79adec361a450a11e5da3f91 Mon Sep 17 00:00:00 2001 From: Kevin Davis Date: Tue, 15 Oct 2019 12:42:51 -0400 Subject: [PATCH 3/3] fix cli tests --- cli_test/cli_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli_test/cli_test.go b/cli_test/cli_test.go index e559e6b7..fe8079d8 100644 --- a/cli_test/cli_test.go +++ b/cli_test/cli_test.go @@ -317,6 +317,8 @@ func TestGaiaCLIConfirmTx(t *testing.T) { } func TestGaiaCLIGasAuto(t *testing.T) { + // https://github.com/cosmos/cosmos-sdk/pull/5179 + t.Skip() t.Parallel() f := InitFixtures(t)