diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 4f4d9f7..c7c2137 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -24,13 +24,13 @@ jobs: - name: checkout uses: actions/checkout@v2 - name: simple test - run: go test -v ./ -count=1 + run: go test -v ./... -count=1 - name: test with GC pressure - run: go test -v ./ -count=1 + run: go test -v ./... -count=1 env: GOGC: 1 - name: test with race detector - run: go test -v -race ./ -count=1 + run: go test -v -race ./... -count=1 bench: name: Benchmark runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index fd49bb1..363563a 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ PKG := github.com/goccy/go-json BIN_DIR := $(CURDIR)/bin -PKGS := $(shell go list ./... | grep -v internal/cmd) +PKGS := $(shell go list ./... | grep -v internal/cmd|grep -v test) COVER_PKGS := $(foreach pkg,$(PKGS),$(subst $(PKG),.,$(pkg))) COMMA := , @@ -14,7 +14,7 @@ $(BIN_DIR): .PHONY: cover cover: - go test -coverpkg=$(COVERPKG_OPT) -coverprofile=cover.out . + go test -coverpkg=$(COVERPKG_OPT) -coverprofile=cover.out ./... .PHONY: cover-html cover-html: cover diff --git a/cover_array_test.go b/test/cover/cover_array_test.go similarity index 100% rename from cover_array_test.go rename to test/cover/cover_array_test.go diff --git a/cover_bool_test.go b/test/cover/cover_bool_test.go similarity index 100% rename from cover_bool_test.go rename to test/cover/cover_bool_test.go diff --git a/cover_bytes_test.go b/test/cover/cover_bytes_test.go similarity index 100% rename from cover_bytes_test.go rename to test/cover/cover_bytes_test.go diff --git a/cover_float32_test.go b/test/cover/cover_float32_test.go similarity index 100% rename from cover_float32_test.go rename to test/cover/cover_float32_test.go diff --git a/cover_float64_test.go b/test/cover/cover_float64_test.go similarity index 100% rename from cover_float64_test.go rename to test/cover/cover_float64_test.go diff --git a/cover_helper_test.go b/test/cover/cover_helper_test.go similarity index 100% rename from cover_helper_test.go rename to test/cover/cover_helper_test.go diff --git a/cover_int16_test.go b/test/cover/cover_int16_test.go similarity index 100% rename from cover_int16_test.go rename to test/cover/cover_int16_test.go diff --git a/cover_int32_test.go b/test/cover/cover_int32_test.go similarity index 100% rename from cover_int32_test.go rename to test/cover/cover_int32_test.go diff --git a/cover_int64_test.go b/test/cover/cover_int64_test.go similarity index 100% rename from cover_int64_test.go rename to test/cover/cover_int64_test.go diff --git a/cover_int8_test.go b/test/cover/cover_int8_test.go similarity index 100% rename from cover_int8_test.go rename to test/cover/cover_int8_test.go diff --git a/cover_int_test.go b/test/cover/cover_int_test.go similarity index 100% rename from cover_int_test.go rename to test/cover/cover_int_test.go diff --git a/cover_map_test.go b/test/cover/cover_map_test.go similarity index 100% rename from cover_map_test.go rename to test/cover/cover_map_test.go diff --git a/cover_marshal_json_test.go b/test/cover/cover_marshal_json_test.go similarity index 100% rename from cover_marshal_json_test.go rename to test/cover/cover_marshal_json_test.go diff --git a/cover_marshal_text_test.go b/test/cover/cover_marshal_text_test.go similarity index 100% rename from cover_marshal_text_test.go rename to test/cover/cover_marshal_text_test.go diff --git a/cover_number_test.go b/test/cover/cover_number_test.go similarity index 100% rename from cover_number_test.go rename to test/cover/cover_number_test.go diff --git a/cover_slice_test.go b/test/cover/cover_slice_test.go similarity index 100% rename from cover_slice_test.go rename to test/cover/cover_slice_test.go diff --git a/cover_string_test.go b/test/cover/cover_string_test.go similarity index 100% rename from cover_string_test.go rename to test/cover/cover_string_test.go diff --git a/cover_uint16_test.go b/test/cover/cover_uint16_test.go similarity index 100% rename from cover_uint16_test.go rename to test/cover/cover_uint16_test.go diff --git a/cover_uint32_test.go b/test/cover/cover_uint32_test.go similarity index 100% rename from cover_uint32_test.go rename to test/cover/cover_uint32_test.go diff --git a/cover_uint64_test.go b/test/cover/cover_uint64_test.go similarity index 100% rename from cover_uint64_test.go rename to test/cover/cover_uint64_test.go diff --git a/cover_uint8_test.go b/test/cover/cover_uint8_test.go similarity index 100% rename from cover_uint8_test.go rename to test/cover/cover_uint8_test.go diff --git a/cover_uint_test.go b/test/cover/cover_uint_test.go similarity index 100% rename from cover_uint_test.go rename to test/cover/cover_uint_test.go diff --git a/example_marshaling_test.go b/test/example/example_marshaling_test.go similarity index 100% rename from example_marshaling_test.go rename to test/example/example_marshaling_test.go diff --git a/example_test.go b/test/example/example_test.go similarity index 100% rename from example_test.go rename to test/example/example_test.go diff --git a/example_text_marshaling_test.go b/test/example/example_text_marshaling_test.go similarity index 100% rename from example_text_marshaling_test.go rename to test/example/example_text_marshaling_test.go