Skip to content

Commit

Permalink
test: add nondeterminism short version
Browse files Browse the repository at this point in the history
  • Loading branch information
egonspace committed Oct 14, 2021
1 parent cab06ff commit e101528
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release-sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 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,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:
Expand Down
5 changes: 5 additions & 0 deletions 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 Down

0 comments on commit e101528

Please sign in to comment.