forked from projectcaluma/caluma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
36 lines (28 loc) · 1019 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
language: python
python:
- "3.6"
services:
- docker
env:
global:
- DOCKER_COMPOSE_VERSION=1.21.0
before_install:
# install newer compose version
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
# Workaround for https://github.com/travis-ci/travis-ci/issues/4842
# Let's stop postgresql
- sudo service postgresql stop
# wait for postgresql to shutdown
- while sudo lsof -Pi :5432 -sTCP:LISTEN -t; do sleep 1; done
# set UID to run docker service with
- echo "UID=$(id --user)" > .env
install:
- docker-compose up -d --build
script:
- docker-compose exec caluma black --check .
- docker-compose exec caluma flake8
- docker-compose exec caluma ./manage.py makemigrations --check --dry-run --no-input
- docker-compose exec caluma pytest --no-cov-on-fail --cov --create-db