-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add slither-mutate support in GH actions
- Loading branch information
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Slither Mutate Analysis | ||
|
||
#on: workflow_dispatch | ||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
env: | ||
FOUNDRY_PROFILE: ci | ||
|
||
jobs: | ||
check: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install Slither | ||
run: | | ||
pip install slither-analyzer | ||
- name: Run Slither-Mutate | ||
run: | | ||
slither-mutate . --test-cmd='forge test' --test-dir='test' --ignore-dirs='script,lib,test,utils,deployment' | ||
id: slither-mutate |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "Instructing the shell to exit immediately if any command returns a non-zero exit status..." | ||
set -e | ||
echo "Done." | ||
|
||
echo "Navigating to the root directory of the project..." | ||
cd ../../ | ||
echo "Done." | ||
|
||
echo "Removing directory mutation_campaign if it exists..." | ||
if [ -d "mutation_campaign" ] | ||
then | ||
rm -rf mutation_campaign | ||
fi | ||
echo "Done." | ||
|
||
echo "Starting Slither Mutate Campaign..." | ||
slither-mutate . --test-cmd='forge test' --test-dir='test' --ignore-dirs='script,lib,test,utils,cache,out,broadcast,deployment' | ||
echo "Done." |