-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (61 loc) · 1.43 KB
/
.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
dist: xenial
language: python
cache: pip
python: 3.7
services:
- postgresql
- docker
addons:
postgresql: "10"
env:
global:
- DJANGO_SETTINGS_MODULE=selectielijst.conf.ci
- DB_PASSWORD=
- DB_USER=postgres
install:
- pip install -r requirements/ci.txt
- pip install codecov
- npm ci
jobs:
include:
# Run jobs in parallel in stage Tests
- stage: "Tests"
name: "Unit tests"
script:
- python src/manage.py collectstatic --noinput --link
- coverage run src/manage.py test src
- name: "Code imports"
before_install: skip
install:
- pip install isort
before_script: skip
script: isort --recursive --check-only --diff .
- name: "Code format"
before_install: skip
install:
- pip install black
before_script: skip
script: black --check src
# - name: "Code style"
# before_install: skip
# install:
# - pip install flake8
# before_script: skip
# script: flake8 src
- stage: "Publication"
name: "Docker image build"
before_install: skip
install: skip
before_script: skip
script: docker build .
deploy:
- provider: script
script: bin/docker_push.sh latest
on:
branch: master
- provider: script
script: bin/docker_push.sh $TRAVIS_TAG
on:
tags: true
after_success:
- codecov