From f89eb5882fd692e0482dc5f5d1f22a440d66f570 Mon Sep 17 00:00:00 2001 From: Alex Roan Date: Tue, 2 Apr 2024 10:49:48 +0100 Subject: [PATCH] CI workflow test --- .github/workflows/run_aderyn.yml | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/run_aderyn.yml diff --git a/.github/workflows/run_aderyn.yml b/.github/workflows/run_aderyn.yml new file mode 100644 index 000000000..827c74d2d --- /dev/null +++ b/.github/workflows/run_aderyn.yml @@ -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 + + \ No newline at end of file