Skip to content

davidslusser/actions_python_radon

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

actions_python_radon

A Github action for running code complexity analysis with radon. This action uses the cc command from radon to compute the Cyclomatic Complexity of Python source files.


How to use

In your .github/workflows directory, create a yaml file (such as main.yaml). Add a job for each desired workflow with the uses keyword. Use the with keyword to pass any desired variables.

Examples:

on: [push]

jobs:
  radon:
    runs-on: ubuntu-latest
    name: "radon"
    steps:
      - uses: actions/checkout@v3
      - uses: davidslusser/actions_python_radon@v1.0.0

on: [push]

jobs:
  radon:
    runs-on: ubuntu-latest
    name: "radon"
    steps:
      - uses: actions/checkout@v3
      - uses: davidslusser/actions_python_radon@v1.0.0
        with:
          src: "src"
          min: "A"
          grade: "B"

Inputs

  • src: source file or directory used for analysis (defaults to ".")
  • grade: letter grade (rank) to use for pass/fail; average complexity must be equal or greater than this value to pass (defaults to "B")
  • min: minimum complexity rank to display (defaults to "A")

References