test and chore: updating tests accounting for staking implementation #580
Workflow file for this run
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: 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@v3 | |
with: | |
submodules: recursive | |
- name: Get a specific Node.js version such that hardhat does not hang periodically | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18.15.0" | |
# Install modules | |
- name: Install modules | |
run: yarn install | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
# Run linters | |
- name: Run ESLint | |
run: ./node_modules/.bin/eslint . --ext .js,.jsx,.ts,.tsx | |
- name: Run solhint | |
run: ./node_modules/.bin/solhint contracts/*.sol | |
# Compile the code | |
- name: Compile, adjust uniswap library hash and recompile again | |
run: npm run compile | |
# Run tests and deploy script(s) | |
- name: Run tests | |
run: ./node_modules/.bin/hardhat test | |
- name: Run script(s) | |
run: ./node_modules/.bin/hardhat run deploy/contracts.js | |
# Compile the code and run foundry tests | |
- name: Run foundry tests | |
run: forge test --hh -vvv | |
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/zricethezav/gitleaks/releases/download/v8.10.1/gitleaks_8.10.1_linux_x64.tar.gz && \ | |
tar -xzf gitleaks_8.10.1_linux_x64.tar.gz && \ | |
sudo install gitleaks /usr/bin && \ | |
gitleaks detect --report-format json --report-path leak_report -v |