Skip to content

Commit

Permalink
simulator: add makefile cmds and fix determinism test (osmosis-labs#2280
Browse files Browse the repository at this point in the history
)

* add makefile and fix determinism non-commit

* make sim steps clearer

* fix cmd
  • Loading branch information
czarcas7ic authored Aug 4, 2022
1 parent 40f19a3 commit aac7bfa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/sim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
go-version: 1.18
- name: Display go version
run: go version
- name: Run simulation
- name: Run full application simulation
run: |
make test-sim
make test-sim-app
- name: Run simulation determinism check
run: |
make test-sim-determinism
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,18 @@ test-race:
test-cover:
@VERSION=$(VERSION) go test -mod=readonly -timeout 30m -coverprofile=coverage.txt -tags='norace' -covermode=atomic $(PACKAGES_UNIT)

test-sim:
test-sim-suite:
@VERSION=$(VERSION) go test -mod=readonly $(PACKAGES_SIM)

test-sim-app:
@VERSION=$(VERSION) go test -mod=readonly -run ^TestFullAppSimulation -v $(PACKAGES_SIM)

test-sim-determinism:
@VERSION=$(VERSION) go test -mod=readonly -run ^TestAppStateDeterminism -v $(PACKAGES_SIM)

test-sim-benchmark:
@VERSION=$(VERSION) go test -benchmem -run ^BenchmarkFullAppSimulation -bench ^BenchmarkFullAppSimulation -cpuprofile cpu.out $(PACKAGES_SIM)

test-e2e:
@VERSION=$(VERSION) OSMOSIS_E2E_UPGRADE_VERSION="v12" go test -mod=readonly -timeout=25m -v $(PACKAGES_E2E)

Expand Down
1 change: 1 addition & 0 deletions tests/simulator/sim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ func TestAppStateDeterminism(t *testing.T) {
config.OnOperation = false
config.AllInvariants = false
config.ChainID = helpers.SimAppChainID
config.Commit = true

// This file is needed to provide the correct path
// to reflect.wasm test file needed for wasmd simulation testing.
Expand Down

0 comments on commit aac7bfa

Please sign in to comment.