Skip to content

[WIP]Feature/optimize withdraw scripts #196

[WIP]Feature/optimize withdraw scripts

[WIP]Feature/optimize withdraw scripts #196

Workflow file for this run

name: UNITEST
on:
pull_request:
branches:
- main
- develop
- 'release/**'
paths:
- '**'
jobs:
UNITEST:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@main
with:
submodules: recursive
token: ${{ secrets.NEW_PAT }}
- name: Setup Go
uses: actions/setup-go@v2
with:
golang-version: 1.19
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup yarn
id: yarn-cache-dir-path
run: |
npm install -g yarn
echo "::set-output name=dir::$(yarn cache dir)"
- name: Setup Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Checking Make Build
run: |
unset NVM_DIR
sudo apt update
sudo apt install -y build-essential coreutils libuv1 libudev-dev libusb-1.0-0-dev
make build
- name: UNITEST
id: unitest
run: |
cd packages/contracts-bedrock/
yarn build
yarn build:differential
yarn build:fuzz
forge test |tee /tmp/1.txt
result=$(tail -n1 /tmp/1.txt)
result=$(echo $result|sed -r "s/\\x1B[\\x5d\[]([0-9]{1,3}(;[0-9]{1,3})?(;[0-9]{1,3})?)?[mGK]?//g" | sed -r "s/([0-9]+)/**\1**/g" | sed "s/passed/passed😊/g" | sed "s/failed/failed😂/g" )
echo "::set-output name=result::$result"
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
message: |
${{ steps.unitest.outputs.result }}