Cross-Contract #149
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: Solidity | |
on: [push, pull_request] | |
jobs: | |
check-copyright: | |
name: Copyright | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: License header | |
run: .scripts/check-copyright-notice.sh | |
- name: Authors | |
run: .scripts/check-notice-authors.sh origin/main | |
build-and-test: | |
name: Build & Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install npm | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Install Python dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python3 python3-pip python3.10-dev build-essential | |
- name: Install dependencies | |
run: yarn | |
- name: Lint | |
run: npx solhint 'contracts/**/*.sol' | |
- name: Compile | |
run: npx hardhat compile | |
- name: Static analysis | |
run: | | |
pip3 install slither-analyzer==0.8.3 | |
slither --exclude solc-version,timestamp,boolean-equality,unimplemented-functions,locked-ether --filter-paths vendor/ . | |
# Alternatively, one can use Docker: | |
# WORKDIR=/share docker run --rm -v $(pwd):$WORKDIR -w $WORKDIR --entrypoint slither trailofbits/eth-security-toolbox [insert slither parameters here] | |
- name: Test | |
run: npx hardhat test | |