Refactor fees #495
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: test | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
jobs: | |
run-tests: | |
name: Test contracts | |
runs-on: ubuntu-latest | |
# https://docs.github.com/en/actions/reference/authentication-in-a-workflow | |
permissions: | |
id-token: write | |
packages: read | |
contents: read | |
security-events: write | |
timeout-minutes: 15 | |
container: | |
image: ghcr.io/nayms/contracts-builder:latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install solc | |
run: svm install 0.7.6 && svm install 0.8.17 && svm use 0.8.17 | |
- name: Fix ownership | |
run: git config --global --add safe.directory /__w/contracts-v3/contracts-v3 | |
- name: Install Forge dependencies | |
run: forge install | |
- name: Install Node dependencies | |
run: yarn | |
- name: Prepare build | |
run: make prep-build | |
- name: Build solidity contracts | |
run: make build | |
- name: Tests - local | |
env: | |
ETH_MAINNET_RPC_URL: ${{ secrets.ETH_MAINNET_RPC_URL }} | |
ETH_SEPOLIA_RPC_URL: ${{ secrets.ETH_SEPOLIA_RPC_URL }} | |
ETH_GOERLI_RPC_URL: ${{ secrets.ETH_GOERLI_RPC_URL }} | |
run: make test | |
- name: Coverage report | |
env: | |
ETH_MAINNET_RPC_URL: ${{ secrets.ETH_MAINNET_RPC_URL }} | |
run: make coverage | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: "./lcov-filtered.info" | |
- name: Slither Static Analyser | |
uses: crytic/[email protected] | |
id: slither | |
with: | |
sarif: results.sarif | |
target: src/diamonds/nayms | |
slither-args: --exclude solc-version,assembly-usage,naming-convention,low-level-calls --ignore-compile | |
continue-on-error: true | |
- name: Upload Slither SARIF file | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: ${{ steps.slither.outputs.sarif }} | |
# - name: Generate upgrade hashes | |
# env: | |
# ETH_MAINNET_RPC_URL: ${{ secrets.ETH_MAINNET_RPC_URL }} | |
# ETH_GOERLI_RPC_URL: ${{ secrets.ETH_GOERLI_RPC_URL }} | |
# ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | |
# run: | | |
# make upgrade-hash-mainnet | |
# make upgrade-hash-goerli | |
# make upgrade-hash-sepolia | |
# echo "### Upgrade hash" >> $GITHUB_STEP_SUMMARY | |
# echo " - mainnet \`$(jq --raw-output '.returns.upgradeHash.value' broadcast/SmartDeploy.s.sol/1/dry-run/hash-latest.json || echo "Not Available")\`" >> $GITHUB_STEP_SUMMARY | |
# echo "> $(jq --raw-output '.returns.cut.value' broadcast/SmartDeploy.s.sol/1/dry-run/hash-latest.json || echo "Not Available")" >> $GITHUB_STEP_SUMMARY | |
# echo " - goerli \`$(jq --raw-output '.returns.upgradeHash.value' broadcast/SmartDeploy.s.sol/5/dry-run/hash-latest.json || echo "Not Available")\`" >> $GITHUB_STEP_SUMMARY | |
# echo "> $(jq --raw-output '.returns.cut.value' broadcast/SmartDeploy.s.sol/5/dry-run/hash-latest.json || echo "Not Available")" >> $GITHUB_STEP_SUMMARY | |
# echo " - sepolia \`$(jq --raw-output '.returns.upgradeHash.value' broadcast/SmartDeploy.s.sol/11155111/dry-run/hash-latest.json || echo "Not Available")\`" >> $GITHUB_STEP_SUMMARY | |
# echo "> $(jq --raw-output '.returns.cut.value' broadcast/SmartDeploy.s.sol/11155111/dry-run/hash-latest.json || echo "Not Available") >> $GITHUB_STEP_SUMMARY |