mirror of https://github.com/crytic/slither
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
2.2 KiB
93 lines
2.2 KiB
---
|
|
name: CI
|
|
|
|
defaults:
|
|
run:
|
|
# To load bashrc
|
|
shell: bash -ieo pipefail {0}
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- dev
|
|
pull_request:
|
|
schedule:
|
|
# run CI every day even if no PRs/merges occur
|
|
- cron: '0 12 * * *'
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: ["ubuntu-latest", "windows-2022"]
|
|
type: ["cli",
|
|
"dapp",
|
|
"data_dependency",
|
|
# "embark",
|
|
"erc",
|
|
"etherlime",
|
|
# "etherscan"
|
|
"find_paths",
|
|
"flat",
|
|
"kspec",
|
|
"printers",
|
|
# "prop"
|
|
"simil",
|
|
"slither_config",
|
|
"truffle",
|
|
"upgradability"]
|
|
exclude:
|
|
# Requires nix
|
|
- os: windows-2022
|
|
type: dapp
|
|
# Requires nvm
|
|
- os: windows-2022
|
|
type: etherlime
|
|
# Requires nvm
|
|
- os: windows-2022
|
|
type: truffle
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Set up shell
|
|
if: runner.os == 'Windows'
|
|
run: |
|
|
echo 'C:\msys64\mingw64\bin' >> "$GITHUB_PATH"
|
|
echo 'C:\msys64\usr\bin' >> "$GITHUB_PATH"
|
|
|
|
- name: Set up Python 3.6
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: 3.6
|
|
- name: Install dependencies
|
|
run: |
|
|
|
|
python setup.py install
|
|
# Used by ci_test.sh
|
|
pip install deepdiff
|
|
|
|
pip install "solc-select>=v1.0.0b1"
|
|
solc-select install all
|
|
solc-select use 0.5.1
|
|
pip install typing_extensions==4.1.1
|
|
pip install importlib_metadata==4.8.3
|
|
|
|
- name: Set up nix
|
|
if: matrix.type == 'dapp'
|
|
uses: cachix/install-nix-action@v16
|
|
|
|
- name: Set up cachix
|
|
if: matrix.type == 'dapp'
|
|
uses: cachix/cachix-action@v10
|
|
with:
|
|
name: dapp
|
|
|
|
- name: Run Tests
|
|
env:
|
|
TEST_TYPE: ${{ matrix.type }}
|
|
GITHUB_ETHERSCAN: ${{ secrets.GITHUB_ETHERSCAN }}
|
|
run: |
|
|
bash "scripts/ci_test_${TEST_TYPE}.sh"
|
|
|