<p>This should get you started:
<a href="https://github.com/py-actions/flake8" rel="nofollow noreferrer">https://github.com/py-actions/flake8</a></p>
<p>Or if you prefer to do it more manually you can use this:</p>
<pre class="lang-yaml prettyprint-override"><code>name: Python

on:
  push:
    branches: [main]
  pull_request:

jobs:
  flake8:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Set up Python
        uses: actions/setup-python@v4.1.0
        with:
          python-version: 3

      - name: Install flake8
        run: pip --disable-pip-version-check install flake8

      - name: Lint with flake8
        run: flake8 --count
</code></pre>

CC BY-SA 4.0
2022-08-05T09:22:53.077Z
2022-08-05T09:22:53.077Z
lukee
<p>I have a codebase that is not in compliance with flake8. The CI/CD pipeline uses GitHub/GitHub actions. I would like to start adding python flake8 (to check for complexity, errors and code smells) progressively. How can I accomplish this task?</p>

<continuous-integration><continuous-deployment><github><github-actions><linting>
Incorporating python linter(flake8) in the CI/CD pipeline that use GitHub, Github Actions in a code base that is not in compliance
MasterOfTheHouse
# Incorporating python linter(flake8) in the CI/CD pipeline that use GitHub, Github Actions in a code base that is not in compliance

(Asked by: username_0 on 2021-08-27)

I have a codebase that is not in compliance with flake8. The CI/CD pipeline uses GitHub/GitHub actions. I would like to start adding python flake8 (to check for complexity, errors and code smells) progressively. How can I accomplish this task?

**Tags:** continuous-integration, continuous-deployment, github, github-actions, linting


---

## 1 answers

### Answer by username_1 on 2022-08-05. Score: 0

This should get you started:
https://github.com/py-actions/flake8
Or if you prefer to do it more manually you can use this:
name: Python

on:
  push:
    branches: [main]
  pull_request:

jobs:
  flake8:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Set up Python
        uses: actions/setup-python@v4.1.0
        with:
          python-version: 3

      - name: Install flake8
        run: pip --disable-pip-version-check install flake8

      - name: Lint with flake8
        run: flake8 --count


---

