forked from GemeenteUtrecht/boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (56 loc) · 1.29 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
dist: xenial
language: python
cache: pip
python: 3.8
services:
- postgresql
addons:
postgresql: "10"
env:
global:
- DJANGO_SETTINGS_MODULE=boilerplate.conf.ci
- SECRET_KEY=dummy
- DB_PASSWORD=
- DB_USER=postgres
install:
- pip install -r requirements/ci.txt
- pip install codecov
- npm ci
- npm run build
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 . --check-only --diff
- name: "Code format"
before_install: skip
install:
- pip install black
before_script: skip
script: black --check src --diff
- stage: "Docker image"
name: Docker image build
services:
- docker
install: 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