diff --git a/.circleci/config.yml b/.circleci/config.yml index 18d519cf9a..82ed61fb95 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -76,6 +76,7 @@ jobs: key: go-src-v1-{{ .Revision }} paths: - ".git" + proto: executor: protoc steps: @@ -86,27 +87,6 @@ jobs: target: proto-gen proto-lint proto-check-breaking description: "Lint and verify Protocol Buffer definitions" - test-sim-nondeterminism: - executor: golang - steps: - - make: - target: test-sim-nondeterminism - description: "Test individual module simulations" - - test-sim-import-export: - executor: golang - steps: - - make: - target: test-sim-import-export - description: "Test application import/export simulation" - - test-sim-after-import: - executor: golang - steps: - - make: - target: test-sim-after-import - description: "Test simulation after import" - test-sim-multi-seed-long: executor: golang steps: @@ -114,13 +94,6 @@ jobs: target: test-sim-multi-seed-long description: "Test multi-seed simulation (long)" - test-sim-multi-seed-short: - executor: golang - steps: - - make: - target: test-sim-multi-seed-short - description: "Test multi-seed simulation (short)" - test-cover: executor: golang parallelism: 4 @@ -196,21 +169,6 @@ workflows: tags: only: - /^v.*/ - - proto: - requires: - - setup-dependencies - - test-sim-nondeterminism: - requires: - - setup-dependencies - - test-sim-import-export: - requires: - - setup-dependencies - - test-sim-after-import: - requires: - - setup-dependencies - - test-sim-multi-seed-short: - requires: - - setup-dependencies - test-sim-multi-seed-long: requires: - setup-dependencies @@ -224,6 +182,9 @@ workflows: - test-cover: requires: - setup-dependencies + - proto: + requires: + - setup-dependencies - upload-coverage: requires: - test-cover diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml new file mode 100644 index 0000000000..d0b4b0fe7f --- /dev/null +++ b/.github/workflows/sims.yml @@ -0,0 +1,125 @@ +name: Sims +on: [pull_request] +jobs: + cleanup-runs: + runs-on: ubuntu-latest + steps: + - uses: rokroskar/workflow-run-cleanup-action@master + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + + build: + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, 'skip-sims')" + steps: + - uses: actions/setup-go@v1 + id: go + with: + go-version: 1.14 + - name: Setup env for GO + # this is only used until the setup-go action is updated + run: | + echo "::set-env name=GOPATH::$(go env GOPATH)" + echo "::add-path::$(go env GOPATH)/bin" + echo "::set-env name=GO111MODULE::"on"" + shell: bash + - name: install runsim + run: | + go get github.com/cosmos/tools/cmd/runsim@v1.0.0 + - uses: actions/cache@v1 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + + test-sim-nondeterminism: + runs-on: ubuntu-latest + needs: Build + steps: + - uses: actions/setup-go@v1 + id: go + with: + go-version: 1.14 + - name: Setup env for GO + # this is only used until the setup-go action is updated + run: | + echo "::set-env name=GOPATH::$(go env GOPATH)" + echo "::add-path::$(go env GOPATH)/bin" + shell: bash + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + - name: test nondeterminism + run: | + make test-sim-nondeterminism + + test-sim-import-export: + runs-on: ubuntu-latest + needs: Build + steps: + - uses: actions/setup-go@v1 + id: go + with: + go-version: 1.14 + - name: Setup env for GO + # this is only used until the setup-go action is updated + run: | + echo "::set-env name=GOPATH::$(go env GOPATH)" + echo "::add-path::$(go env GOPATH)/bin" + shell: bash + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + - name: test-sim-import-export + run: | + make test-sim-import-export + + test-sim-after-import: + runs-on: ubuntu-latest + needs: Build + steps: + - uses: actions/setup-go@v1 + id: go + with: + go-version: 1.14 + - name: Setup env for GO + # this is only used until the setup-go action is updated + run: | + echo "::set-env name=GOPATH::$(go env GOPATH)" + echo "::add-path::$(go env GOPATH)/bin" + shell: bash + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + - name: test after import + run: | + make test-sim-import-export + + test-sim-multi-seed-short: + runs-on: ubuntu-latest + needs: Build + steps: + - uses: actions/setup-go@v1 + id: go + with: + go-version: 1.14 + - name: Setup env for GO + # this is only used until the setup-go action is updated + run: | + echo "::set-env name=GOPATH::$(go env GOPATH)" + echo "::add-path::$(go env GOPATH)/bin" + shell: bash + - uses: actions/checkout@v2 + - uses: actions/cache@v1 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + - name: test-sim-multi-seed-short + run: | + make test-sim-multi-seed-short