Skip to content

[VEN-2553]: Add core pool liquidation operator #475

[VEN-2553]: Add core pool liquidation operator

[VEN-2553]: Add core pool liquidation operator #475

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
workflow_dispatch:
jobs:
lint:
name: Lint
env:
THE_GRAPH_STUDIO_API_KEY: ${{ secrets.THE_GRAPH_STUDIO_API_KEY }}
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 20
cache: "yarn"
- name: Install dependencies
run: yarn
- name: Prepare
run: |
yarn workspace @venusprotocol/token-converter-bot run generate-abis
yarn workspace @venusprotocol/token-converter-bot run generate-subgraph-types
- name: Check linting of solidity and typescript
run: yarn lint
test:
name: Test
runs-on: ubuntu-22.04
env:
NODE_OPTIONS: --max-old-space-size=4096
THE_GRAPH_STUDIO_API_KEY: ${{ secrets.THE_GRAPH_STUDIO_API_KEY }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
- name: Install deps
run: yarn
- name: Prepare tests
run: |
yarn workspace @venusprotocol/token-converter-bot run generate-abis
yarn workspace @venusprotocol/token-converter-bot run generate-subgraph-types
- name: Run hardhat compile and tests coverage
run: |
source packages/smart-contracts/.env.example
mkdir coverage
yarn coverage:combined
- name: Code Coverage Report
uses: irongut/[email protected]
continue-on-error: true
with:
filename: coverage/coverage.json
badge: true
fail_below_min: false
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: "50 80"
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
continue-on-error: true
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md
deploy:
name: Deploy
env:
THE_GRAPH_STUDIO_API_KEY: ${{ secrets.THE_GRAPH_STUDIO_API_KEY }}
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
- name: Install dependencies
run: yarn
- name: Build
run: yarn workspace @venusprotocol/keeper-bot-contracts run build
- name: Verify deployments work
run: yarn workspace @venusprotocol/keeper-bot-contracts run hardhat deploy
export-deployments:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.VENUS_TOOLS_TOKEN }}
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 20
cache: "yarn"
- name: Install dependencies
run: yarn
- name: Export deployments
run: |
for NETWORK in bsctestnet bscmainnet ethereum sepolia; do
EXPORT=true yarn workspace @venusprotocol/keeper-bot-contracts run hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json
jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./packages/smart-contracts/deployments/${NETWORK}.json > ./packages/smart-contracts/deployments/${NETWORK}_addresses.json
done
yarn prettier
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "feat: updating deployment files"
file_pattern: "./packages/smart-contracts/deployments/*.json"