Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix cli_test error of wasmplus #52

Merged
merged 4 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected]
with:
go-version: 1.18
- name: Display go version
run: go version
- name: Check if difference
uses: technote-space/[email protected]
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"
}
]
}
}