From a8a4c637b521aabd538e03559acc3628ff9ee669 Mon Sep 17 00:00:00 2001 From: Roman <34196718+p0mvn@users.noreply.github.com> Date: Wed, 6 Apr 2022 09:45:14 -0700 Subject: [PATCH] cleanup Makefile and ci workflows (#1203) * cleanup makefile and ci workflows * update changelog * fix sim test * fix makefile and rename docker repo --- .github/workflows/sim.yml | 3 ++- .github/workflows/test.yml | 3 ++- CHANGELOG.md | 1 + Makefile | 20 ++++++++++++++------ tests/e2e/e2e_setup_test.go | 2 +- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/sim.yml b/.github/workflows/sim.yml index 04616183fa8..cf2b59c99dd 100644 --- a/.github/workflows/sim.yml +++ b/.github/workflows/sim.yml @@ -17,4 +17,5 @@ jobs: - name: Display go version run: go version - name: Run simulation - run: go test ./simapp + run: | + make test-sim diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 152625676e9..5ba0e532b25 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,8 @@ jobs: - name: Display go version run: go version - name: Run all tests - run: go test -mod=readonly -timeout 30m -coverprofile=coverage.txt -tags='norace' -covermode=atomic `go list ./... | grep -E -v 'simapp|e2e'` + run: | + make test-cover - name: Codecov uses: codecov/codecov-action@v1.5.2 diff --git a/CHANGELOG.md b/CHANGELOG.md index ace435fc19a..030d4e11fca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#1107](https://github.com/osmosis-labs/osmosis/pull/1107) Update to wasmvm v0.24.0, re-enabling building on M1 macs! ### Minor improvements & Bug Fixes +* [#1203](https://github.com/osmosis-labs/osmosis/pull/1203) cleanup Makefile and ci workflows * [#1177](https://github.com/osmosis-labs/osmosis/pull/1177) upgrade to go 1.18 * [#1193](https://github.com/osmosis-labs/osmosis/pull/1193) Setup e2e tests on a single chain; add balances query test * [#1095](https://github.com/osmosis-labs/osmosis/pull/1095) Fix authz being unable to use lockup & superfluid types. diff --git a/Makefile b/Makefile index 146688b64f4..380c1bf2172 100644 --- a/Makefile +++ b/Makefile @@ -206,6 +206,11 @@ sync-docs: ### Tests & Simulation ### ############################################################################### +PACKAGES_UNIT=$(shell go list ./... | grep -E -v 'simapp|e2e') +PACKAGES_E2E=$(shell go list ./... | grep '/e2e') +PACKAGES_SIM=$(shell go list ./... | grep '/simapp') +TEST_PACKAGES=./... + include sims.mk test: test-unit test-build @@ -213,22 +218,25 @@ test: test-unit test-build test-all: check test-race test-cover test-unit: - @VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock norace' ./... + @VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock norace' $(PACKAGES_UNIT) test-race: - @VERSION=$(VERSION) go test -mod=readonly -race -tags='ledger test_ledger_mock' ./... + @VERSION=$(VERSION) go test -mod=readonly -race -tags='ledger test_ledger_mock' $(PACKAGES_UNIT) test-cover: - @go test -mod=readonly -timeout 30m -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' ./... + @VERSION=$(VERSION) go test -mod=readonly -timeout 30m -coverprofile=coverage.txt -tags='norace' -covermode=atomic $(PACKAGES_UNIT) + +test-sim: + @VERSION=$(VERSION) go test -mod=readonly $(PACKAGES_SIM) test-e2e: - @VERSION=$(VERSION) go test -mod=readonly -timeout=25m -v ./tests/e2e + @VERSION=$(VERSION) go test -mod=readonly -timeout=25m -v $(PACKAGES_E2E) benchmark: - @go test -mod=readonly -bench=. ./... + @go test -mod=readonly -bench=. $(PACKAGES_UNIT) docker-build-debug: - @docker build -t cosmos/osmosisd-e2e --build-arg IMG_TAG=debug -f e2e.Dockerfile . + @docker build -t osmolabs/osmosisd-e2e --build-arg IMG_TAG=debug -f e2e.Dockerfile . ############################################################################### ### Linting ### diff --git a/tests/e2e/e2e_setup_test.go b/tests/e2e/e2e_setup_test.go index f88d265e073..5e320e8c68c 100644 --- a/tests/e2e/e2e_setup_test.go +++ b/tests/e2e/e2e_setup_test.go @@ -255,7 +255,7 @@ func (s *IntegrationTestSuite) runValidators(c *chain, portOffset int) { Mounts: []string{ fmt.Sprintf("%s/:/osmosis/.osmosisd", val.configDir()), }, - Repository: "cosmos/osmosisd-e2e", + Repository: "osmolabs/osmosisd-e2e", } // expose the first validator for debugging and communication