Created
March 17, 2022 18:58
-
-
Save vlad-bezden/47493cc31fecd3ecc6c4d00c1fcd2d72 to your computer and use it in GitHub Desktop.
Drone.io file for checking python code. It runs all steps/tasks in parallel, and not doing changes, just validate if code follows isort, black, flake8, mypy standards.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: pipeline | |
name: python_code_check | |
type: kubernetes | |
steps: | |
- name: isort | |
pull: if-not-exists | |
image: python:3.10-alpine | |
depends_on: [clone] | |
commands: | |
- python -m pip install --upgrade pip | |
- python -m pip install -r requirements.txt | |
- isort --check-only ./src | |
- name: black | |
pull: if-not-exists | |
image: python:3.10-alpine | |
depends_on: [clone] | |
commands: | |
- python -m pip install --upgrade pip | |
- python -m pip install -r requirements.txt | |
- black --check ./src | |
- name: flake8 | |
pull: if-not-exists | |
image: python:3.10-alpine | |
depends_on: [clone] | |
commands: | |
- python -m pip install --upgrade pip | |
- python -m pip install -r requirements.txt | |
- flake8 ./src | |
- name: mypy | |
pull: if-not-exists | |
image: python:3.10-alpine | |
depends_on: [clone] | |
commands: | |
- python -m pip install --upgrade pip | |
- python -m pip install -r requirements.txt | |
- mypy ./src |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment