clone:
|
|
git:
|
|
image: plugins/git
|
|
depth: 50
|
|
tags: true
|
|
|
|
pipeline:
|
|
restore-cache:
|
|
image: drillster/drone-volume-cache
|
|
restore: true
|
|
mount:
|
|
- .cache
|
|
volumes:
|
|
- /tmp/cache:/cache
|
|
|
|
python-linting:
|
|
image: python:3-alpine
|
|
commands:
|
|
- apk -U add libmagic file-dev libffi libffi-dev cmake gcc g++ make pkgconfig git boost-dev wget postgresql-dev curl curl-dev
|
|
- pip install --upgrade pip setuptools
|
|
- pip install --cache-dir=.cache flake8
|
|
- pip install --cache-dir=.cache black
|
|
- pip install --cache-dir=.cache -r requirements.txt
|
|
- python setup.py install
|
|
- black --check .
|
|
- flake8 .
|
|
|
|
backend-build:
|
|
image: elixir:1.8.1
|
|
environment:
|
|
MIX_ENV: test
|
|
commands:
|
|
- cd backend
|
|
- mix local.hex --force
|
|
- mix local.rebar --force
|
|
- mix deps.get
|
|
- mix format --check-formatted
|
|
- mix compile --force
|
|
- mix ecto.migrate
|
|
|
|
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 ]
|
|
|
|
services:
|
|
database:
|
|
image: splashblot/docker-postgis
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_DB=pyairwaves_test
|
|
- POSTGRES_HOST_AUTH_METHOD=trust
|