Skip to content

Add Radon analysis workflow for cyclomatic complexity checks #14

Add Radon analysis workflow for cyclomatic complexity checks

Add Radon analysis workflow for cyclomatic complexity checks #14

name: Radon Analysis
on:
pull_request:
branches: ["2.0"]
jobs:
comment:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Radon
run: pip install radon
- name: Create Radon's reports
run: |
radon cc $(git diff --name-only origin/HEAD) -j >cc.json
radon mi $(git diff --name-only origin/HEAD) -j >mi.json
radon hal $(git diff --name-only origin/HEAD) -j >hal.json
- name: Comment the results on the PR
uses: Libra-foundation/[email protected]
with:
cc: "cc.json"
mi: "mi.json"
hal: "hal.json"