Skip to content

return empty vault orders if clob pair does not exist or is in final settlement #4609

return empty vault orders if clob pair does not exist or is in final settlement

return empty vault orders if clob pair does not exist or is in final settlement #4609

Workflow file for this run

name: Protocol Sims
# Sims workflow runs multiple types of simulations (nondeterminism, import-export, after-import, multi-seed-short)
# This workflow will run on all pushes to main, if a .go, .mod or .sum file have been changed
on: # yamllint disable-line rule:truthy
pull_request:
paths:
- 'protocol/**'
push:
branches:
- main
- 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x
- 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x
paths:
- 'protocol/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./protocol
if: "!contains(github.event.head_commit.message, 'skip-sims')"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Display go version
run: go version
- run: make build
install-runsim:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Display go version
run: go version
- name: Install runsim
run: go install github.com/cosmos/tools/cmd/[email protected]
- uses: actions/[email protected]
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
test-sim-nondeterminism:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./protocol
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Display go version
run: go version
- uses: actions/[email protected]
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-nondeterminism
run: |
make test-sim-nondeterminism
- name: Slack notify on failure
uses: slackapi/[email protected]
id: slack
if: ${{ failure() }}
with:
# yamllint disable rule:line-length
payload: |
{
"text": "*${{ github.workflow }}* job `${{ github.job }}` result :x: `${{ job.status }}` :x: for commit ${{ github.event.pull_request.html_url || github.event.head_commit.url }}\n>Triggered by `${{ github.actor }}`, Commit hash ${{ github.sha }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*${{ github.workflow }}* job `${{ github.job }}` result :x: `${{ job.status }}` :x: for commit ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ">Triggered by `${{ github.actor }}`, Commit hash ${{ github.sha }}"
}
}
]
}
# yamllint enable rule:line-length
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ENG_NOTIFY_WEBHOOK }}
test-sim-import-export:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./protocol
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Display go version
run: go version
- uses: actions/[email protected]
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-import-export
run: |
make test-sim-import-export
- name: Slack notify on failure
uses: slackapi/[email protected]
id: slack
if: ${{ failure() }}
with:
# yamllint disable rule:line-length
payload: |
{
"text": "*${{ github.workflow }}* job `${{ github.job }}` result :x: `${{ job.status }}` :x: for commit ${{ github.event.pull_request.html_url || github.event.head_commit.url }}\n>Triggered by `${{ github.actor }}`, Commit hash ${{ github.sha }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*${{ github.workflow }}* job `${{ github.job }}` result :x: `${{ job.status }}` :x: for commit ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ">Triggered by `${{ github.actor }}`, Commit hash ${{ github.sha }}"
}
}
]
}
# yamllint enable rule:line-length
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ENG_NOTIFY_WEBHOOK }}
test-sim-after-import:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./protocol
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Display go version
run: go version
- uses: actions/[email protected]
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-after-import
run: |
make test-sim-after-import
- name: Slack notify on failure
uses: slackapi/[email protected]
id: slack
if: ${{ failure() }}
with:
# yamllint disable rule:line-length
payload: |
{
"text": "*${{ github.workflow }}* job `${{ github.job }}` result :x: `${{ job.status }}` :x: for commit ${{ github.event.pull_request.html_url || github.event.head_commit.url }}\n>Triggered by `${{ github.actor }}`, Commit hash ${{ github.sha }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*${{ github.workflow }}* job `${{ github.job }}` result :x: `${{ job.status }}` :x: for commit ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ">Triggered by `${{ github.actor }}`, Commit hash ${{ github.sha }}"
}
}
]
}
# yamllint enable rule:line-length
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ENG_NOTIFY_WEBHOOK }}
test-sim-multi-seed-short:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./protocol
needs: [build, install-runsim]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Display go version
run: go version
- uses: actions/[email protected]
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-multi-seed-short
run: |
make test-sim-multi-seed-short
- name: Slack notify on failure
uses: slackapi/[email protected]
id: slack
if: ${{ failure() }}
with:
# yamllint disable rule:line-length
payload: |
{
"text": "*${{ github.workflow }}* job `${{ github.job }}` result :x: `${{ job.status }}` :x: for commit ${{ github.event.pull_request.html_url || github.event.head_commit.url }}\n>Triggered by `${{ github.actor }}`, Commit hash ${{ github.sha }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*${{ github.workflow }}* job `${{ github.job }}` result :x: `${{ job.status }}` :x: for commit ${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ">Triggered by `${{ github.actor }}`, Commit hash ${{ github.sha }}"
}
}
]
}
# yamllint enable rule:line-length
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ENG_NOTIFY_WEBHOOK }}