Skip to content

fix(Dispenser): close vulnerabilities-list items #8, #9, #12, #25 #1380

fix(Dispenser): close vulnerabilities-list items #8, #9, #12, #25

fix(Dispenser): close vulnerabilities-list items #8, #9, #12, #25 #1380

Workflow file for this run

name: Workflow
on:
push:
branches:
- main
pull_request:
jobs:
build:
continue-on-error: False
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Node.js
uses: actions/setup-node@v4
# Install modules
- name: Install modules
run: yarn install
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
# Run linters
- name: Run ESLint
run: ./node_modules/.bin/eslint . --ext .js,.jsx,.ts,.tsx
- name: Run solhint
run: ./node_modules/.bin/solhint contracts/interfaces/*.sol contracts/*.sol contracts/test/*.sol
# Compile the code
- name: Compile, adjust uniswap library hash and recompile again
run: yarn compile
# Compile the code and run hardhat tests
- name: Run hardhat tests
run: yarn test
# Run hardhat coverage and upload codecov report
- name: Solidity coverage summary
run: yarn coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
# Compile the code and run foundry tests (except for fork ones)
- name: Run foundry tests
run: forge test --mc Depository && forge test --mc Dispenser && forge test --mc Treasury && forge test --mc UniswapPriceOracleConstructorTest && forge test --mc UniswapPriceOracleGetPriceTest && forge test --mc UniswapPriceOracleUpdatePriceTest && forge test --mc UniswapPriceOracleGetTWAPTest && forge test --mc BalancerPriceOracleConstructorTest && forge test --mc BalancerPriceOracleGetPriceTest && forge test --mc BalancerPriceOracleUpdatePriceTest && forge test --mc BalancerPriceOracleGetTWAPTest && forge test --mc LPSwapCeloConstructorTest && forge test --mc LPSwapCeloSwapTest && forge test --mc LPSwapCeloSlippageTest
scan:
name: gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: "1.17.7"
- run: |
wget https://github.com/gitleaks/gitleaks/releases/download/v8.21.2/gitleaks_8.21.2_linux_x64.tar.gz && \
tar -xzf gitleaks_8.21.2_linux_x64.tar.gz && \
sudo install gitleaks /usr/bin && \
gitleaks detect --config .gitleaks.toml --report-format json --report-path leak_report -v
all-checks-passed:
name: All checks passed
if: always()
needs: [build, scan]
runs-on: ubuntu-latest
steps:
- name: Fail if any dependency failed or was cancelled
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1
- name: Success
run: echo "All required checks passed"