Skip to content

Commit

Permalink
fix: fix cli_test error of wasmplus (#52)
Browse files Browse the repository at this point in the history
* fix: fix cli_test error of wasmplus

* ci: add cli_test and race unittest in ci

* chore: update changelog

* chore: change makefile test name.
  • Loading branch information
zemyblue authored Jun 16, 2023
1 parent 72f7e85 commit 0a1d457
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 9 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,37 @@ jobs:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"

tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3.5.0
with:
go-version: 1.18
- name: Display go version
run: go version
- name: Check if difference
uses: technote-space/get-diff-action@v6.1.2
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
.github/workflows/test.yml
- name: Build
run: make build
if: env.GIT_DIFF
- name: Test
run: make test
if: env.GIT_DIFF
- name: Test race
run: make test-race
if: env.GIT_DIFF
- name: Test integration
run: make test-cli
if: env.GIT_DIFF

test-cover:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Improvements

### Bug Fixes
* [\#52](https://github.com/Finschia/wasmd/pull/52) fix cli_test error of wasmplus and add cli_test ci

### Breaking Changes

Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ distclean: clean


test: test-unit
test-all: check test-race test-cover
test-all: test-race test-cover test-cli

test-unit:
@VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock' ./...
Expand All @@ -133,6 +133,9 @@ test-race:
test-cover:
@go test -mod=readonly -timeout 30m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' ./...

test-cli:
@go test -mod=readonly -tags="cli_test" ./.../testutil/...

benchmark:
@go test -mod=readonly -bench=. ./...

Expand Down
4 changes: 2 additions & 2 deletions x/wasm/client/testutil/cli_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build norace
// +build norace
//go:build cli_test
// +build cli_test

package testutil

Expand Down
4 changes: 2 additions & 2 deletions x/wasmplus/client/testutil/cli_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build norace
// +build norace
//go:build cli_test
// +build cli_test

package testutil

Expand Down
4 changes: 0 additions & 4 deletions x/wasmplus/client/testutil/testdata/wasm_genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@
"address": "",
"permission": "Everybody"
},
"compile_cost": "3",
"gas_multiplier": "140000000",
"instance_cost": "60000",
"instantiate_default_permission": "Everybody"
},
"sequences":
Expand All @@ -67,5 +64,4 @@
"value": "2"
}
]
}
}

0 comments on commit 0a1d457

Please sign in to comment.