Skip to content

davidslusser/actions_python_ruff

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

7 Commits
 
 
 
 
 
 

Repository files navigation

actions_python_ruff

A Github action for python linting with ruff.


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:
  ruff:
    runs-on: ubuntu-latest
    name: "ruff"
    steps:
      - uses: davidslusser/[email protected]

on: [push]

jobs:
  ruff:
    runs-on: ubuntu-latest
    name: "ruff"
    steps:
      - uses: davidslusser/[email protected]
        with:
          src: "src"
          options: "--cov=src"
          pip_install_command: "pip install -e .[dev]"
          python_version: "3.9"

Inputs

  • src: source directory of code to check (defaults to ".")
  • options: optional flags/parameters used in ruff command
  • pip_install_command: pip install command (defaults to "pip install ruff")
  • python_version: version of python to run workflow with (defaults to "3.x")

References

About

Github action for running python linting with ruff

Resources

License

Stars

Watchers

Forks

Packages

No packages published