From e101528b7c538ff863683c14469b781db090f24d Mon Sep 17 00:00:00 2001 From: egonspace Date: Thu, 14 Oct 2021 19:57:36 +0900 Subject: [PATCH] test: add nondeterminism short version --- .github/workflows/release-sims.yml | 27 +++++++++++++++++++++++++++ .github/workflows/sims.yml | 6 +++--- Makefile | 5 +++++ 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-sims.yml b/.github/workflows/release-sims.yml index a8467f8dcc..91bea49667 100644 --- a/.github/workflows/release-sims.yml +++ b/.github/workflows/release-sims.yml @@ -35,6 +35,33 @@ jobs: 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] diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 56b2090cea..9dfe2d5671 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -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: @@ -66,9 +66,9 @@ 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-short: diff --git a/Makefile b/Makefile index 478e38b1e3..3f06fe0cd4 100644 --- a/Makefile +++ b/Makefile @@ -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 \