Skip to content

brobeson/PythonWorkflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Workflow

Workflow Quality GitHub Release

This is a reusable workflow to ensure quality Python code. For general help with reusable workflows, read GitHub's Reusing workflows documentation.

Getting Started

To use this workflow, just set it in the uses key of a job in your project's workflow file. Here is an example workflow snippet that calls this workflow:

jobs:
  dotFiles:
    name: Python
    uses: brobeson/PythonWorkflow/.github/workflows/python.yaml@v1

Steps

The workflow has two jobs: Static Analysis and Test.

Static Analysis

The Static Analysis job runs the steps described in the following sections.

  1. Format Check The job runs Black on all Python files in the repository. Use a configuration file in your repository to control how Black formats your code. The job reports mis-formatted files; it does not modify any files.
  2. PyLint
    The job runs PyLint on all Python files in the repository. Use a configuration file in your repository to control PyLint runs.
  3. MyPy
    The job runs MyPy on all Python files in the repository. Use a configuration file in your repository to control MyPy runs.
  4. isort
    The job runs isort on all Python files in the repository. Use a configuration file in your repository to control isort runs.
  5. Build Docs
    The job runs Sphinx in the docs/ directory to ensure documentation builds without issues.

Test

The Test job runs tests on multiple platforms, with multiple versions of Python.

  1. Run Tests
    The job runs pytest. This step assumes your tests follow default pytest conventions, or you configured pytest in your repository.
  2. Report Test Coverage
    After running tests, the job uploads coverage data to Coveralls. It uploads a separate report for each cell in the test matrix (OS / Python combination).

Issue Tracking

GitHub Issues or Pull Requests by label GitHub Issues or Pull Requests by label GitHub Issues or Pull Requests by label GitHub milestone details

Report a bug | Request a new step | Update an existing step

About

Ensure high quality Python code

Topics

Resources

License

Stars

Watchers

Forks