Skip to content

Commit

Permalink
chore: updated build workflow to run smartbugs over all solidity file…
Browse files Browse the repository at this point in the history
…s exclude Migrations.sol
  • Loading branch information
limcheekin committed Sep 15, 2021
1 parent 5307deb commit dc4c7ee
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/truffle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,20 @@ jobs:
- name: Remove SmartBugs Results and Install SmartBugs Dependencies
run: cd smartbugs;rm -r results;pip install -r requirements.txt
- name: Run SmartBugs Analysis
run: DIR=$(pwd);cd smartbugs;python smartBugs.py --tool all --file $DIR/contracts/Greeter.sol

run: |
solidityFiles=($(ls -I Migrations.sol contracts))
DIR=$(pwd);cd smartbugs
for sol in "${solidityFiles[@]}"
do
echo "Analysing $sol..."
python smartBugs.py --tool all --file $DIR/contracts/$sol
done
- name: Move SmartBugs Results to Parent Directory
run: rm -r results && cd smartbugs;mv results ../
run: |
[[ -d results ]] && rm -r results
cd smartbugs
mv results ../
- name: Commit SmartBugs Results
uses: EndBug/add-and-commit@v7
with:
Expand Down

0 comments on commit dc4c7ee

Please sign in to comment.