summaryrefslogtreecommitdiffstats
path: root/.drone.yml
diff options
context:
space:
mode:
authorDashie <dashie@sigpipe.me>2018-07-31 06:05:11 +0200
committerDashie <dashie@sigpipe.me>2018-07-31 06:05:11 +0200
commit7b17f7a4a77fee8ea491aaa9a22da3340095ec32 (patch)
tree25dd194980f4a1464480bb19768e992df0924a03 /.drone.yml
parent6f1857a770bb4e45b562c8b7fd8b6487ab0d8b1b (diff)
Add drone for python app
Diffstat (limited to '.drone.yml')
-rw-r--r--.drone.yml45
1 files changed, 45 insertions, 0 deletions
diff --git a/.drone.yml b/.drone.yml
new file mode 100644
index 00000000..24dc80cf
--- /dev/null
+++ b/.drone.yml
@@ -0,0 +1,45 @@
+clone:
+ git:
+ image: plugins/git:1
+ depth: 50
+ tags: true
+
+pipeline:
+ restore-cache:
+ image: drillster/drone-volume-cache
+ restore: true
+ mount:
+ - .cache
+ volumes:
+ - /tmp/cache:/cache
+
+ build:
+ image: python:3-alpine
+ commands:
+ - apk -U add sox sox-dev taglib taglib-dev libmagic file-dev
+ - apk add cmake gcc g++ make pkgconfig git boost-dev gd-dev libmad-dev libsndfile-dev libid3tag-dev wget
+ - pip install --upgrade pip setuptools
+ - pip install --cache-dir=.cache -r requirements.txt
+ - pip install --cache-dir=.cache -r test-requirements.txt
+ - python setup.py install
+ - ./tests/install_audiowaveform.sh
+ - flake8 .
+ - cp config.py.sample config.py
+ - pytest -v
+
+ rebuild-cache:
+ image: drillster/drone-volume-cache
+ rebuild: true
+ mount:
+ - .cache
+ volumes:
+ - /tmp/cache:/cache
+
+ notify:
+ image: plugins/slack
+ channel: gitea
+ secrets:
+ - SLACK_WEBHOOK
+ when:
+ event: [ push, tag, pull_request ]
+ status: [ changed, failure, success ]