Add Radon analysis workflow for cyclomatic complexity checks #27
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 | |
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 src/ -j >cc.json | |
radon mi src/ -j >mi.json | |
radon hal src/ -j >hal.json | |
- name: Comment the results on the PR | |
uses: Libra-foundation/radon-comment@v0.1 | |
with: | |
cc: "cc.json" | |
mi: "mi.json" | |
hal: "hal.json" |