Skip to content

Commit

Permalink
cleanup Makefile and ci workflows (#1203)
Browse files Browse the repository at this point in the history
* cleanup makefile and ci workflows

* update changelog

* fix sim test

* fix makefile and rename docker repo
  • Loading branch information
p0mvn authored Apr 6, 2022
1 parent fa83c22 commit a8a4c63
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/sim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ jobs:
- name: Display go version
run: go version
- name: Run simulation
run: go test ./simapp
run: |
make test-sim
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
20 changes: 14 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,29 +206,37 @@ 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

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 ###
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/e2e_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a8a4c63

Please sign in to comment.