Skip to content

Commit

Permalink
CI workflow test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexroan committed Apr 2, 2024
1 parent 03f9664 commit f89eb58
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/run_aderyn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on: [push, pull_request, workflow_dispatch]

name: Run Aderyn

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Install aderyn
run: cargo install aderyn

- name: Run aderyn
run: aderyn ./tests/contract-playground -o ci-report.json

- name: Check report
run: |
jq '.issue_count | .critical, .high, .medium' ci-report.json | while read value; do
if [ "$value" -gt 0 ]; then
echo "Found issues: critical, high, or medium issue count is above zero."
exit 1
fi
done

0 comments on commit f89eb58

Please sign in to comment.