Add Radon analysis workflow for cyclomatic complexity checks #14
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
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" |