Linter workflow
Path to file (view file on GitHub)
The original file is located at the following path:
.github / workflows / lint.yml
This GitHub Actions workflow is designed to automate the linting process for a Python application using flake8. It triggers on both pushes and pull requests. The essential elements of this workflow are as follows:
Workflow Name
- name: Python Lint
Triggers
- on:
- push: Triggers on any push to the repository.
- pull_request: Triggers on any pull request to the repository.
Jobs
- build: This job runs on the latest Ubuntu environment (
ubuntu-latest
).
Steps
- Checkout Repository
- Uses the
actions/checkout@v2
action to checkout the repository.
- Uses the
- Set up Python
- Uses the
actions/setup-python@v2
action to set up Python 3.x.
- Uses the
- Install Dependencies
- Upgrades
pip
and installsflake8
using the following commands:python -m pip install --upgrade pip pip install flake8
- Upgrades
- Lint with flake8
- Runs
flake8
on theapp
directory to lint the Python code:flake8 app
- Runs