Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Create separate scripts for flywheel #517

Create separate scripts for flywheel

Create separate scripts for flywheel #517

name: Pull Request - build and run tests
on:
push:
branches:
- main
- development
pull_request:
branches:
- main
- development
env:
EXCLUDE_TESTS: "Abstract|BeefyERC4626Test|DotDotERC4626Test|ArrakisERC4626Test|JarvisERC4626Test|CurveERC4626Test|EllipsisERC4626Test|HelioERC4626Test|WombatERC4626Test|AaveV3ERC4626Test|ThenaERC4626Test"
FLAKY_TESTS: "AnyLiquidationTest|LiquidityMiningTest"
SLOW_TESTS: "MaxBorrowTest|OraclesDecimalsScalingTest|MinBorrowTest|LeveredPositionTest|OraclesDecimalsScalingTest"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Npm dependencies
run: npm install --force
- name: Lint
run: npm run lint
build-and-test-mode:
needs: [lint]
env:
MNEMONIC: "${{ secrets.MNEMONIC }}"
TEST_RUN_CHAINID: 34443
TEST_RUN_LEVEL: ${{ github.event_name == 'pull_request' && '100' || '90' }}
MODE_MAINNET_RPC_URL: https://mainnet.mode.network/
MODE_ARCHIVE_RPC_URL: https://mainnet.mode.network/
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Npm dependencies
run: npm install --force
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Forge dependencies
run: forge install
- name: Forge RPC cache
uses: actions/cache@v3
with:
path: "~/.foundry/cache"
key: rpc-cache-local-${{ hashFiles('rpc-cache-keyfile') }}
- name: Run base tests for Mode mainnet
run: forge test -vv --no-match-contract '${{ env.EXCLUDE_TESTS }}|${{ env.FLAKY_TESTS }}|${{ env.SLOW_TESTS }}'
- name: Run slow tests for Mode mainnet
if: always()
run: forge test -vv --match-contract '${{ env.SLOW_TESTS }}'
- name: Run flaky tests for Mode mainnet
if: always()
run: forge test -vv --match-contract '${{ env.FLAKY_TESTS }}'
build-and-test-local:
needs: [lint]
env:
MNEMONIC: "${{ secrets.MNEMONIC }}"
TEST_RUN_CHAINID: 0
TEST_RUN_LEVEL: ${{ github.event_name == 'pull_request' && '100' || '90' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Npm dependencies
run: npm install --force
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Forge dependencies
run: forge install
- name: Forge RPC cache
uses: actions/cache@v3
with:
path: "~/.foundry/cache"
key: rpc-cache-local-${{ hashFiles('rpc-cache-keyfile') }}
- name: Run forge tests locally
run: forge test -vv --no-match-contract 'Abstract|BeefyERC4626Test|DotDotERC4626Test|ArrakisERC4626Test|JarvisERC4626Test|CurveERC4626Test|EllipsisERC4626Test|HelioERC4626Test|WombatERC4626Test|AaveV3ERC4626Test|ThenaERC4626Test'