Skip to content

feat: update othermarketdata.json and render metadata #233

feat: update othermarketdata.json and render metadata

feat: update othermarketdata.json and render metadata #233

name: Validate Other Market Data
on:
pull_request:
paths:
- 'public/configs/otherMarketData.json'
- 'scripts/validate-other-market-data.ts'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up pnpm
uses: dydxprotocol/[email protected]
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
pnpm install --loglevel warn
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.21
- name: Checkout v4-chain repo
uses: actions/checkout@v3
with:
repository: 'dydxprotocol/v4-chain'
ref: '5e7bf529424a55d69edbaedf6c8a52674e06d0c1'
path: 'v4-chain'
- name: Start v4 localnet
run: |
cd v4-chain/protocol
sed -i '/\.consensus\.timeout_commit.*-v '\''5s'\''/s/5s/1s/' testing/testnet-local/local.sh
echo "Building v4-chain/protocol..."
make build
echo "Starting localnet..."
DOCKER_BUILDKIT=1 make localnet-init
DOCKER_BUILDKIT=1 make localnet-compose-upd -e RAYDIUM_URL=${{ secrets.RAYDIUM_URL }}
- name: Get diff of otherMarketData.json
run: |
git fetch origin
git diff remotes/origin/main -- public/configs/otherMarketData.json > otherMarketDiff.txt
- name: Checkout main branch
uses: actions/checkout@v3
with:
ref: 'main'
path: 'v4-web-main-other-market-validation'
- name: Validate other market data
run: pnpx tsx scripts/markets/validate-other-market-data.ts