Skip to content

Commit

Permalink
test: add action cron
Browse files Browse the repository at this point in the history
  • Loading branch information
egonspace committed Oct 14, 2021
1 parent e101528 commit a7f1381
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 87 deletions.
87 changes: 1 addition & 86 deletions .github/workflows/release-sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,94 +35,9 @@ 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]
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

test-sim-multi-seed-long-part1:
runs-on: ubuntu-latest
needs: [build, install-runsim, test-sim-import-export, test-sim-after-import]
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2.1.3
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ test-sim-custom-genesis-fast:

test-sim-import-export-short: runsim
@echo "Running application import/export simulation. This may take several minutes..."
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 20 5 TestAppImportExport
@$(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..."
Expand Down

0 comments on commit a7f1381

Please sign in to comment.