Add Radon analysis workflow for cyclomatic complexity checks #21
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: [push, pull_request] | |
jobs: | |
radon-analysis: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Fetch all history for all branches and tags | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install Radon | |
run: pip install radon | |
- name: Run Radon Analysis | |
run: | | |
git fetch --unshallow # Ensure full history is available | |
radon cc $(git diff --name-only 2.0...HEAD || echo "no_files") -j >cc.json |