2022-05-02 13:53:19 +00:00
|
|
|
# https://docs.drone.io/pipeline/overview/
|
|
|
|
# https://docs.drone.io/pipeline/configuration/
|
|
|
|
|
2022-05-02 00:03:00 +00:00
|
|
|
kind: pipeline
|
2022-05-02 13:53:19 +00:00
|
|
|
type: docker
|
2022-05-30 22:03:32 +00:00
|
|
|
name: app-check
|
2022-05-02 00:03:00 +00:00
|
|
|
|
|
|
|
steps:
|
2022-05-30 22:03:32 +00:00
|
|
|
- name: build-deps
|
2022-05-30 22:09:41 +00:00
|
|
|
image: 'python:3-alpine'
|
2022-05-02 00:03:00 +00:00
|
|
|
commands:
|
|
|
|
- python -m venv .venv
|
|
|
|
- source ./.venv/bin/activate
|
|
|
|
- pip install -r requirements.txt
|
2022-05-30 22:03:32 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
include:
|
|
|
|
- pull_request
|
2022-05-02 13:53:19 +00:00
|
|
|
- name: pylama
|
2022-05-30 22:09:41 +00:00
|
|
|
image: 'python:3-alpine'
|
2022-05-02 13:53:19 +00:00
|
|
|
commands:
|
2022-05-30 22:12:44 +00:00
|
|
|
- apk update > /dev/null && apk add git > /dev/null
|
2022-05-30 22:03:32 +00:00
|
|
|
#- python -m venv .venv
|
2022-05-02 13:53:19 +00:00
|
|
|
- source ./.venv/bin/activate
|
2022-05-30 20:54:26 +00:00
|
|
|
- 'pip install pylama pylama\[all\] > /dev/null'
|
2022-05-30 22:14:48 +00:00
|
|
|
- 'echo ${DRONE_TARGET_BRANCH}'
|
|
|
|
- 'git diff --name-only --diff-filter=ACMRTUXB ${DRONE_TARGET_BRANCH}'
|
2022-05-30 22:03:32 +00:00
|
|
|
- 'pylama $(git diff --name-only --diff-filter=ACMRTUXB ${DRONE_TARGET_BRANCH} | grep -E "(.py$)")'
|
2022-05-02 13:53:19 +00:00
|
|
|
when:
|
|
|
|
event:
|
|
|
|
include:
|
|
|
|
- pull_request
|
|
|
|
branch:
|
|
|
|
exclude: master
|
|
|
|
|
|
|
|
|
2022-05-30 22:03:32 +00:00
|
|
|
#---
|
|
|
|
#kind: pipeline
|
|
|
|
#type: docker
|
|
|
|
#name: deploy
|
|
|
|
#
|
|
|
|
#steps:
|
|
|
|
# - name: deploy
|
|
|
|
# image: alpine
|
|
|
|
# commands:
|
|
|
|
# - 'echo "TODO: implement deploy"'
|
|
|
|
# when:
|
|
|
|
# branch: master
|
|
|
|
#
|
|
|
|
#depends_on:
|
|
|
|
# - build
|
|
|
|
# - code-audit
|