Skip to content

Instantly share code, notes, and snippets.

@vlad-bezden
Created March 17, 2022 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vlad-bezden/47493cc31fecd3ecc6c4d00c1fcd2d72 to your computer and use it in GitHub Desktop.
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.
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