Skip to content

Commit

Permalink
fix: test error
Browse files Browse the repository at this point in the history
  • Loading branch information
shiki-tak committed Jun 6, 2022
1 parent 6984ef5 commit 181e9ea
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 6 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/builds_and_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,36 @@ jobs:
- name: set up
uses: actions/setup-go@v2
with:
go-version: ^1.15.11
go-version: ^1.17.4
id: go
- name: Checkout
uses: actions/checkout@v2
- name: Check Go formatting
run: |
[ "$(gofmt -l .)" = "" ] || (gofmt -d . && exit 1)
tidy-go:
runs-on: ubuntu-latest
steps:
- name: set up
uses: actions/setup-go@v2
with:
go-version: ^1.17.4
id: go
- name: CHeckout
uses: actions/checkout@v2
- name: Check go mod tidy
# Use --check or --exit-code when available (Go 1.19?)
# https://github.com/golang/go/issues/27005
run: |
go mod tidy
CHANGES_IN_REPO=$(git status --porcelain)
if [[ -n "$CHANGES_IN_REPO" ]]; then
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:"
git status && git --no-pager diff
exit 1
fi
format-scripts:
runs-on: ubuntu-latest
steps:
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,18 @@ build-go:

test:
# Use package list mode to include all subdirectores. The -count=1 turns off caching.
RUST_BACKTRACE=1 go test -v -count=1 ./...
RUST_BACKTRACE=1 go test -v -count=1 ./... -tags mocks


test-safety:
# Use package list mode to include all subdirectores. The -count=1 turns off caching.
GODEBUG=cgocheck=2 go test -race -v -count=1 ./...
GODEBUG=cgocheck=2 go test -race -v -count=1 ./... -tags mocks

# Creates a release build in a containerized build environment of the static library for Alpine Linux (.a)
release-build-alpine:
rm -rf libwasmvm/target/release
# build the muslc *.a file
docker run --rm -u $(USER_ID):$(USER_GROUP) -v $(shell pwd)/libwasmvm:/code $(ALPINE_TESTER):alpine
docker run --rm -u $(USER_ID):$(USER_GROUP) -v $(shell pwd)/libwasmvm:/code $(BUILDERS_PREFIX):alpine
cp libwasmvm/artifacts/libwasmvm_muslc.a api
cp libwasmvm/artifacts/libwasmvm_muslc.aarch64.a api
make update-bindings
Expand All @@ -80,7 +81,7 @@ release-build-alpine:
release-build-linux-static:
rm -rf libwasmvm/target/release
# build the glibc *.a file
docker run --rm -u $(USER_ID):$(USER_GROUP) -v $(shell pwd)/libwasmvm:/code $(ALPINE_TESTER):static
docker run --rm -u $(USER_ID):$(USER_GROUP) -v $(shell pwd)/libwasmvm:/code $(BUILDERS_PREFIX):static
cp libwasmvm/artifacts/libwasmvm_muslc.a api
cp libwasmvm/artifacts/libwasmvm_muslc.aarch64.a api
make update-bindings
Expand Down
2 changes: 1 addition & 1 deletion api/iterator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func TestRetrieveIterator(t *testing.T) {
callID2 := startCall()

store := dbm.NewMemDB()
var iter dbm.Iterator
var iter Iterator
var err error

iter, _ = store.Iterator(nil, nil)
Expand Down
Binary file modified api/libwasmvm.aarch64.so
Binary file not shown.
Binary file modified api/libwasmvm.dylib
Binary file not shown.
Binary file modified api/libwasmvm.x86_64.so
Binary file not shown.

0 comments on commit 181e9ea

Please sign in to comment.