diff --git a/.github/workflows/sim-label.yml b/.github/workflows/sim-label.yml new file mode 100644 index 00000000000..9e62619af54 --- /dev/null +++ b/.github/workflows/sim-label.yml @@ -0,0 +1,51 @@ +name: SimLabeled +on: + pull_request: + types: [ labeled ] + +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/main'" + + newbuild: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v2.1.3 + with: + go-version: 1.16 + - name: Install runsim + run: export GO111MODULE="on" && 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: + if: ${{ github.event.label.name == 'sim' }} + runs-on: ubuntu-latest + needs: newbuild + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2.1.3 + with: + go-version: 1.16 + - uses: technote-space/get-diff-action@v4 + with: + PATTERNS: | + **/**.go + go.mod + go.sum + - uses: actions/cache@v1 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + if: "env.GIT_DIFF != ''" + - name: test nondeterminism + run: | + make test-sim-nondeterminism + if: "env.GIT_DIFF != ''" \ No newline at end of file