Add StrikeEthStrategy #954
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
# This workflow builds docker image to run rebalance script. | |
name: Smart Contracts PR Workflow | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on PR | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: [master] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
sanity-check: | |
name: PR Sanity Check | |
runs-on: ubuntu-latest | |
env: | |
MNEMONIC: ${{ secrets.MNEMONIC }} | |
ALCHEMY_ETH_GOERLI_KEY: ${{ secrets.ALCHEMY_ETH_GOERLI_KEY }} | |
ALCHEMY_POLYGON_MUMBAI_KEY: ${{ secrets.ALCHEMY_POLYGON_MUMBAI_KEY }} | |
ALCHEMY_BASE_MAINNET_KEY: ${{ secrets.ALCHEMY_BASE_MAINNET_KEY }} | |
ALCHEMY_ETH_MAINNET_KEY: ${{ secrets.ALCHEMY_ETH_MAINNET_KEY }} | |
ALCHEMY_POLYGON_MAINNET_KEY: ${{ secrets.ALCHEMY_POLYGON_MAINNET_KEY }} | |
DEFENDER_API_KEY: ${{ secrets.DEFENDER_API_KEY }} | |
DEFENDER_API_SECRET: ${{ secrets.DEFENDER_API_SECRET }} | |
FOUNDRY_PROFILE: ci | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Reconfigure git to use HTTP authentication | |
run: > | |
git config --global url."https://github.com/".insteadOf | |
ssh://[email protected]/ | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d | |
- name: Install yarn dependencies, and compile contracts | |
run: yarn --frozen-lockfile && yarn build | |
- name: Check lint errors | |
run: yarn lint | |
- name: Check formatting errors | |
run: yarn format | |
- name: Typescript compiles correctly | |
run: yarn build-hh && yarn tsc | |
# Fuzz tests are included by default | |
- name: Check gas snapshots. | |
run: yarn snap --check --tolerance 2 | |
- name: Generate coverage report | |
run: forge coverage --report lcov | |
- name: Report code coverage | |
uses: zgosalvez/github-actions-report-lcov@v1 | |
with: | |
coverage-files: lcov.info | |
minimum-coverage: 10 | |
artifact-name: code-coverage-report | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
working-directory: ./ | |
# TODO: add back once slither works again (https://github.com/crytic/slither/issues/1211) | |
# - name: Check slither errors | |
# uses: crytic/[email protected] | |
# id: slither | |
# continue-on-error: true | |
# with: | |
# sarif: results.sarif | |
# TODO: add back once we have code scanning (https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository#setting-up-code-scanning-manually) | |
# - name: Upload SARIF file | |
# uses: github/codeql-action/upload-sarif@v1 | |
# with: | |
# sarif_file: ${{ steps.slither.outputs.sarif }} |