Skip to content

Commit

Permalink
test: decrease sim test time (#350)
Browse files Browse the repository at this point in the history
* test: decrease sim test time

* fix: use tab on Makefile

* chore: add meaningless comment to enable sim test of github action

* chore: fix lint error

* test: add nondeterminism short version

* test: add action cron

* chore: remove dummy comment

* docs: update changelog
  • Loading branch information
Woosang Son authored Oct 15, 2021
1 parent e5a2be9 commit b56c682
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 95 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary

test-sim-nondeterminism:
test-sim-nondeterminism-short:
runs-on: ubuntu-latest
needs: [build, install-runsim]
steps:
Expand All @@ -66,12 +66,12 @@ jobs:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
if: env.GIT_DIFF
- name: test-sim-nondeterminism
- name: test-sim-nondeterminism-short
run: |
make test-sim-nondeterminism
make test-sim-nondeterminism-short
if: env.GIT_DIFF

test-sim-import-export:
test-sim-import-export-short:
runs-on: ubuntu-latest
needs: [build, install-runsim]
steps:
Expand All @@ -95,12 +95,12 @@ jobs:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
if: env.GIT_DIFF
- name: test-sim-import-export
- name: test-sim-import-export-short
run: |
make test-sim-import-export
make test-sim-import-export-short
if: env.GIT_DIFF

test-sim-after-import:
test-sim-after-import-short:
runs-on: ubuntu-latest
needs: [build, install-runsim]
steps:
Expand All @@ -124,9 +124,9 @@ jobs:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
if: env.GIT_DIFF
- name: test-sim-after-import
- name: test-sim-after-import-short
run: |
make test-sim-after-import
make test-sim-after-import-short
if: env.GIT_DIFF

test-sim-multi-seed-short:
Expand Down
120 changes: 120 additions & 0 deletions .github/workflows/sims_normal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Sims normal version
# Sims workflow runs multiple types of simulations (nondeterminism, import-export, after-import)
# This workflow will run once per a week.
on:
schedule:
- cron: '0 0 * * SAT'

jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-sims')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.15
- name: Display go version
run: go version
- run: make build

install-runsim:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.15
- name: Display go version
run: go version
- name: Install runsim
run: export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0
- uses: actions/cache@v2.1.3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary

test-sim-nondeterminism:
runs-on: ubuntu-latest
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.15
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v5.0.1
with:
PATTERNS: |
**/**.go
!**/**_test.go
go.mod
go.sum
- uses: actions/cache@v2.1.3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
if: env.GIT_DIFF
- name: test-sim-nondeterminism
run: |
make test-sim-nondeterminism
if: env.GIT_DIFF

test-sim-import-export:
runs-on: ubuntu-latest
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.15
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v5.0.1
with:
PATTERNS: |
**/**.go
!**/**_test.go
go.mod
go.sum
SET_ENV_NAME_INSERTIONS: 1
SET_ENV_NAME_LINES: 1
- uses: actions/cache@v2.1.3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
if: env.GIT_DIFF
- name: test-sim-import-export
run: |
make test-sim-import-export
if: env.GIT_DIFF

test-sim-after-import:
runs-on: ubuntu-latest
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.15
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v5.0.1
with:
PATTERNS: |
**/**.go
!**/**_test.go
go.mod
go.sum
SET_ENV_NAME_INSERTIONS: 1
SET_ENV_NAME_LINES: 1
- uses: actions/cache@v2.1.3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
if: env.GIT_DIFF
- name: test-sim-after-import
run: |
make test-sim-after-import
if: env.GIT_DIFF
89 changes: 4 additions & 85 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,99 +2,18 @@

## [Unreleased]

## [v0.43.0](https://github.com/line/lbm-sdk/releases/tag/v0.43.0)

### Features
* (global) [\#97](https://github.com/line/lbm-sdk/pull/97) Add codespace to query error
* (config) [\#114](https://github.com/line/lbm-sdk/pull/114) Add idle-timeout to rest server and rpc server config
* (x/wasm) [\#127](https://github.com/line/lbm-sdk/pull/127) Add wasm with Staragate migration completed.
* (x/wasm) [\#151](https://github.com/line/lbm-sdk/pull/151) Add contract access control.
* (x/wasm) [\#194](https://github.com/line/lbm-sdk/pull/194) Replace importing CosmWasm/wasmvm with line/wasmvm.
* (x/auth) [\#176](https://github.com/line/lbm-sdk/pull/176) Add MsgEmpty to auth module
* (metric) [\#184](https://github.com/line/lbm-sdk/pull/184) Add prometheus metrics for caches reverting telemetry metrics
* (grpc) [\#291](https://github.com/line/lbm-sdk/pull/291) Add GRPC API the BlockByHash and BlockResultsByHeight, add prove parameter to GetTxsEvent

### Improvements
* (bump-up) [\#93](https://github.com/line/lbm-sdk/pull/93) Adopt ostracon, line/tm-db and line/iavl
* (bump-up) [\#107](https://github.com/line/lbm-sdk/pull/107) Bump up tm-db, iavl and ostracon
* (script) [\#110](https://github.com/line/lbm-sdk/pull/110) Add script initializing simd
* (bump-up) [\#118](https://github.com/line/lbm-sdk/pull/118) Bump up tm-db and remove Domain() call
* (test) [\#128](https://github.com/line/lbm-sdk/pull/128) Allow creating new test network without init
* (db) [\#136](https://github.com/line/lbm-sdk/pull/136) Fix DB_BACKEND configuration
* (global) [\#140](https://github.com/line/lbm-sdk/pull/140) Modify default coin type, default address prefix
* (perf) [\#141](https://github.com/line/lbm-sdk/pull/141) Concurrent `checkTx`
* (perf) [\#142](https://github.com/line/lbm-sdk/pull/142) Implement `validateGasWanted()`
* (perf) [\#143](https://github.com/line/lbm-sdk/pull/143) Signature verification cache
* (global) [\#145](https://github.com/line/lbm-sdk/pull/145) Modify key type name
* (perf) [\#155](https://github.com/line/lbm-sdk/pull/155) Concurrent recheckTx
* (global) [\#158](https://github.com/line/lbm-sdk/pull/158) Remove tm-db dependency
* (x/wasm) [\#162](https://github.com/line/lbm-sdk/pull/162) Add missed UpdateContractStatusProposal types
* (perf) [\#164](https://github.com/line/lbm-sdk/pull/164) Sse fastcache
* (build) [\#181](https://github.com/line/lbm-sdk/pull/181) Raise codecov-action version to 1.5.0
* (build) [\#195](https://github.com/line/lbm-sdk/pull/195) Build properly when using libsecp256k1
* (perf) [\#198](https://github.com/line/lbm-sdk/pull/198) Caching paramset
* (global) [\#200](https://github.com/line/lbm-sdk/pull/200) Add a env prefix
* (store) [\#202](https://github.com/line/lbm-sdk/pull/202) Param store doesn't use gas kv
* (store) [\#203](https://github.com/line/lbm-sdk/pull/203) Remove transient store that is not used now
* (perf) [\#204](https://github.com/line/lbm-sdk/pull/204) Apply rw mutex to cachekv
* (perf) [\#208](https://github.com/line/lbm-sdk/pull/208) Use easyjson instead of amino when marshal abci logs
* (perf) [\#209](https://github.com/line/lbm-sdk/pull/209) Apply async reactor ostracon
* (proto) [\#212](https://github.com/line/lbm-sdk/pull/212) Reformat proto files and restore proto docs
* (perf) [\#216](https://github.com/line/lbm-sdk/pull/216) Memoize bech32 encoding and decoding
* (perf) [\#218](https://github.com/line/lbm-sdk/pull/218) Rootmulti store parallel commit
* (perf) [\#219](https://github.com/line/lbm-sdk/pull/219) Fix bech32 cache to get bech32 from proper cache
* (bump-up) [\#221](https://github.com/line/lbm-sdk/pull/221) Bump up iavl for parallel processing of batches
* (perf) [\#224](https://github.com/line/lbm-sdk/pull/224) Updated log time to have milliseconds
* (bump-up) [\#228](https://github.com/line/lbm-sdk/pull/228) Bump up ostracon to optimize checking the txs size
* (global) [\#230](https://github.com/line/lbm-sdk/pull/230) Modify module name to lfb-sdk
* (bump-up) [\#246](https://github.com/line/lbm-sdk/pull/246) Bump up ostracon to not flush wal when receive consensus msgs
* (wasm) [\#250](https://github.com/line/lbm-sdk/pull/250) Migrate linkwasmd to the latest commit
* (wasm) [\#253](https://github.com/line/lbm-sdk/pull/253) remove MaxGas const
* (wasm) [\#254](https://github.com/line/lbm-sdk/pull/254) Specify wasm event types
* (x) [\#255](https://github.com/line/lbm-sdk/pull/255) Remove legacy from modules
* (perf) [\#320](https:/github.com/line/lbm-sdk/pull/320) internal objects optimization (BaseAccount, Balance & Supply)
* (auth) [\#344](https://github.com/line/lbm-sdk/pull/344) move SigBlockHeight from TxBody into AuthInfo
* (slashing) [\#347](https://github.com/line/lbm-sdk/pull/347) Introduce VoterSetCounter
* (auth) [\#348](https://github.com/line/lbm-sdk/pull/348) Increase default valid_sig_block_period

### Bug Fixes
* (test) [\#92](https://github.com/line/lbm-sdk/pull/92) Fix SendToModuleAccountTest
* (store) [\#105](https://github.com/line/lbm-sdk/pull/105) Check `store == nil`
* (test) [\#133](https://github.com/line/lbm-sdk/pull/133) Fix `Test_runImportCmd()`
* (config) [\#138](https://github.com/line/lbm-sdk/pull/138) Fix getting coin type at running cmd
* (race) [\#159](https://github.com/line/lbm-sdk/pull/159) Fix test-race failure
* (test) [\#193](https://github.com/line/lbm-sdk/pull/193) Allow to add new validator in test network
* (client) [\#286](https://github.com/line/lbm-sdk/pull/286) Fix invalid type casting for error
* (test) [\#326](https://github.com/line/lbm-sdk/pull/326) Enable sim test and fix address related bug


### Breaking Changes
* (global) [\#90](https://github.com/line/lbm-sdk/pull/90) Revise module path to `github.com/line/lfb-sdk`
* (rpc) [\#97](https://github.com/line/lbm-sdk/pull/97) Send response with 404 status when quering non-exist account
* (proto) [\#106](https://github.com/line/lbm-sdk/pull/106) Rename package of proto files
* (api) [\#130](https://github.com/line/lbm-sdk/pull/130) Rename rest apis
* (auth) [\#265](https://github.com/line/lbm-sdk/pull/265) Introduce sig block height for the new replay protection
* (global) [\#298](https://github.com/line/lbm-sdk/pull/298) Treat addresses as strings
* (ostracon) [\#317](https://github.com/line/lbm-sdk/pull/317) Integrate Ostracon including vrf election and voter concept
* (global) [\#323](https://github.com/line/lfb-sdk/pull/323) Re-brand lfb-sdk to lbm-sdk
* (proto) [\#338](https://github.com/line/lbm-sdk/pull/338) Upgrade proto buf from v1beta1 to v1

### Build, CI
* (ci) [\#234](https://github.com/line/lbm-sdk/pull/234) Fix branch name in ci script
* (docker) [\#264](https://github.com/line/lbm-sdk/pull/264) Remove docker publish
* (ci) [\#350](https://github.com/line/lbm-sdk/pull/350) Reduce sim test time

### Document Updates
* (docs) [\#205](https://github.com/line/lbm-sdk/pull/205) Renewal docs for open source
* (docs) [\#207](https://github.com/line/lbm-sdk/pull/207) Fix license
* (docs) [\#211](https://github.com/line/lbm-sdk/pull/211) Remove codeowners
* (docs) [\#248](https://github.com/line/lbm-sdk/pull/248) Add PR procedure, apply main branch
* (docs) [\#256](https://github.com/line/lbm-sdk/pull/256) Modify copyright and contributing
* (docs) [\#259](https://github.com/line/lbm-sdk/pull/259) Modify copyright, verified from legal team
* (docs) [\#260](https://github.com/line/lbm-sdk/pull/260) Remove gov, ibc and readme of wasm module
* (docs) [\#262](https://github.com/line/lbm-sdk/pull/262) Fix link urls, remove invalid reference
* (docs) [\#328](https://github.com/line/lbm-sdk/pull/328) Update quick start guide

## [cosmos-sdk v0.42.1] - 2021-03-15
Initial lbm-sdk is based on the cosmos-sdk v0.42.1

* (cosmos-sdk) [v0.42.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.1).

Please refer [CHANGELOG_OF_COSMOS_SDK_v0.42.1](https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/CHANGELOG.md)
<!-- Release links -->
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ endif

.PHONY: run-tests test test-all $(TEST_TARGETS)

test-sim-nondeterminism-short:
@echo "Running non-determinism test..."
@go test -mod=readonly $(SIMAPP) -run TestAppStateDeterminism -Enabled=true \
-NumBlocks=50 -BlockSize=100 -Commit=true -Period=0 -v -timeout 24h

test-sim-nondeterminism:
@echo "Running non-determinism test..."
@go test -mod=readonly $(SIMAPP) -run TestAppStateDeterminism -Enabled=true \
Expand All @@ -269,10 +274,18 @@ test-sim-custom-genesis-fast:
@go test -mod=readonly $(SIMAPP) -run TestFullAppSimulation -Genesis=${HOME}/.gaiad/config/genesis.json \
-Enabled=true -NumBlocks=100 -BlockSize=200 -Commit=true -Seed=99 -Period=5 -v -timeout 24h

test-sim-import-export-short: runsim
@echo "Running application import/export simulation. This may take several minutes..."
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 10 5 TestAppImportExport

test-sim-import-export: runsim
@echo "Running application import/export simulation. This may take several minutes..."
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 5 TestAppImportExport

test-sim-after-import-short: runsim
@echo "Running application simulation-after-import. This may take several minutes..."
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 10 5 TestAppSimulationAfterImport

test-sim-after-import: runsim
@echo "Running application simulation-after-import. This may take several minutes..."
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 5 TestAppSimulationAfterImport
Expand Down Expand Up @@ -301,7 +314,7 @@ test-sim-multi-seed-long-part3: runsim

test-sim-multi-seed-short: runsim
@echo "Running short multi-seed application simulation. This may take awhile!"
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 10 TestFullAppSimulation
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 20 10 TestFullAppSimulation

test-sim-benchmark-invariants:
@echo "Running simulation invariant benchmarks..."
Expand Down
1 change: 1 addition & 0 deletions RELEASE_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
### Build, CI
* (ci) [\#234](https://github.com/line/lbm-sdk/pull/234) Fix branch name in ci script
* (docker) [\#264](https://github.com/line/lbm-sdk/pull/264) Remove docker publish
* (ci) [\#345](https://github.com/line/lbm-sdk/pull/345) Split long sim test into 3 parts

### Document Updates
* (docs) [\#205](https://github.com/line/lbm-sdk/pull/205) Renewal docs for open source
Expand Down

0 comments on commit b56c682

Please sign in to comment.