github.com/cosmos/cosmos-sdk@v0.50.10/.github/workflows/sims-047.yml (about)

     1  name: Sims release/0.47.x
     2  # Sims workflow runs multiple types of simulations (nondeterminism, import-export, after-import, multi-seed-short)
     3  # This workflow will run on all Pull Requests, if a .go, .mod or .sum file have been changed
     4  on:
     5    schedule:
     6      - cron: "0 0,12 * * *"
     7    release:
     8      types: [published]
     9  
    10  concurrency:
    11    group: ci-${{ github.ref }}-sims-047
    12    cancel-in-progress: true
    13  
    14  jobs:
    15    build:
    16      runs-on: ubuntu-latest
    17      if: "!contains(github.event.head_commit.message, 'skip-sims')"
    18      steps:
    19        - uses: actions/checkout@v3
    20          with:
    21            ref: "release/v0.47.x"
    22        - uses: actions/setup-go@v4
    23          with:
    24            go-version: "1.21"
    25            check-latest: true
    26        - run: make build
    27  
    28    install-runsim:
    29      permissions:
    30        contents: none
    31      runs-on: ubuntu-latest
    32      needs: build
    33      steps:
    34        - uses: actions/setup-go@v4
    35          with:
    36            go-version: "1.21"
    37            check-latest: true
    38        - name: Install runsim
    39          run: go install github.com/cosmos/tools/cmd/runsim@v1.0.0
    40        - uses: actions/cache@v3
    41          with:
    42            path: ~/go/bin
    43            key: ${{ runner.os }}-go-runsim-binary
    44  
    45    test-sim-import-export:
    46      runs-on: ubuntu-latest
    47      needs: [build, install-runsim]
    48      timeout-minutes: 60
    49      steps:
    50        - uses: actions/checkout@v3
    51          with:
    52            ref: "release/v0.47.x"
    53        - uses: actions/setup-go@v4
    54          with:
    55            go-version: "1.21"
    56            check-latest: true
    57        - uses: actions/cache@v3
    58          with:
    59            path: ~/go/bin
    60            key: ${{ runner.os }}-go-runsim-binary
    61        - name: test-sim-import-export
    62          run: |
    63            make test-sim-import-export
    64  
    65    test-sim-after-import:
    66      runs-on: ubuntu-latest
    67      needs: [build, install-runsim]
    68      steps:
    69        - uses: actions/checkout@v3
    70          with:
    71            ref: "release/v0.47.x"
    72        - uses: actions/setup-go@v4
    73          with:
    74            go-version: "1.21"
    75            check-latest: true
    76        - uses: actions/cache@v3
    77          with:
    78            path: ~/go/bin
    79            key: ${{ runner.os }}-go-runsim-binary
    80        - name: test-sim-after-import
    81          run: |
    82            make test-sim-after-import
    83  
    84    test-sim-multi-seed-short:
    85      runs-on: ubuntu-latest
    86      needs: [build, install-runsim]
    87      steps:
    88        - uses: actions/checkout@v3
    89          with:
    90            ref: "release/v0.47.x"
    91        - uses: actions/setup-go@v4
    92          with:
    93            go-version: "1.21"
    94            check-latest: true
    95        - uses: actions/cache@v3
    96          with:
    97            path: ~/go/bin
    98            key: ${{ runner.os }}-go-runsim-binary
    99        - name: test-sim-multi-seed-short
   100          run: |
   101            make test-sim-multi-seed-short
   102  
   103    sims-notify-success:
   104      needs:
   105        [test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
   106      runs-on: ubuntu-latest
   107      if: ${{ success() }}
   108      steps:
   109        - uses: actions/checkout@v3
   110        - name: Get previous workflow status
   111          uses: ./.github/actions/last-workflow-status
   112          id: last_status
   113          with:
   114            github_token: ${{ secrets.GITHUB_TOKEN }}
   115  
   116        - name: Notify Slack on success
   117          if: ${{ steps.last_status.outputs.last_status == 'failure' }}
   118          uses: rtCamp/action-slack-notify@v2.2.0
   119          env:
   120            SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
   121            SLACK_CHANNEL: sdk-sims
   122            SLACK_USERNAME: Sim Tests release/0.47.x
   123            SLACK_ICON_EMOJI: ":white_check_mark:"
   124            SLACK_COLOR: good
   125            SLACK_MESSAGE: 0.47.x Sims are passing
   126            SLACK_FOOTER: ""
   127  
   128    sims-notify-failure:
   129      permissions:
   130        contents: none
   131      needs:
   132        [test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
   133      runs-on: ubuntu-latest
   134      if: ${{ failure() }}
   135      steps:
   136        - name: Notify Slack on failure
   137          uses: rtCamp/action-slack-notify@v2.2.0
   138          env:
   139            SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
   140            SLACK_CHANNEL: sdk-sims
   141            SLACK_USERNAME: Sim Tests release/0.47.x
   142            SLACK_ICON_EMOJI: ":skull:"
   143            SLACK_COLOR: danger
   144            SLACK_MESSAGE: 0.47.x Sims are failing
   145            SLACK_FOOTER: ""