Skip to content

JackMcKew/python-interrogate-check

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

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-interrogate-check

A customisable GitHub action to check the style of Python code with interrogate.

Inputs

You can use inputs to alter how interrogate will check your code docstrings.

Path

This tells interrogate where to look for files to check.

fail-under (optional)

Fail when coverage % is less than a given amount.

Default: 80

badge-location (optional)

Generate a shields.io status badge (an SVG image) in at a given file or directory.

Default: .

ignore-module (optional)

Ignore module-level docstrings when running interrogate.

Default: False

Example usage

Include this in your .github/workflows/main.yaml:

uses: JackMcKew/python-interrogate-check@main
with:
  path: 'package_name'

Full Example

Here is an entire workflow for updating a badge as well. Note you will need to set up an access token for the repository.

name: Interrogate documentation

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Set up Python 3.8
      uses: actions/setup-python@v2
      with:
        python-version: 3.8

    - name: Python Interrogate Check
      uses: JackMcKew/python-interrogate-check@main
      with:
        path: 'sample_package'
        badge-location: 'badges/interrogate_badge.svg'

    - name: Commit files
      run: |
        git config --local user.email "action@github.com"
        git config --local user.name "GitHub Action"
        git add badges/interrogate_badge.svg
        git diff --exit-code || git commit -m "Update interrogate_badge.svg" -a

    - name: Push changes
      if: success()
      uses: ad-m/github-push-action@master
      with:
        github_token: ${{ secrets.ACCESS_TOKEN }}

About

GitHub Action for use with python package interrogate

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •