Fix settle dust: Reduce deposited collateral after withdrawal #811
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- packages/protocol/** | |
pull_request: | |
branches: | |
- main | |
paths: | |
- packages/protocol/** | |
jobs: | |
simulate-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Forge build | |
run: forge build | |
working-directory: packages/protocol | |
- name: Simulate deploy on Sepolia | |
id: simulate-deploy | |
run: | | |
set -eo pipefail | |
pnpm run simulate-deploy:sepolia > deploy_output.log 2>&1 | |
echo "DEPLOY_OUTPUT<<EOF" >> $GITHUB_OUTPUT | |
cat deploy_output.log >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
working-directory: packages/protocol | |
- name: Check for success | |
run: | | |
if grep -q "💥" deploy_output.log; then | |
echo "Deployment simulation successful!" | |
elif grep -q "ELIFECYCLE" deploy_output.log; then | |
echo "Deployment simulation failed. Full output:" | |
cat deploy_output.log | |
exit 1 | |
else | |
echo "Unexpected output. Full log:" | |
cat deploy_output.log | |
exit 1 | |
fi | |
working-directory: packages/protocol | |
test-contracts: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Forge build | |
run: forge build | |
working-directory: packages/protocol | |
- name: Smart contract tests | |
run: pnpm run test | |
working-directory: packages/protocol |