forked from translate/pootle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
96 lines (88 loc) · 2.59 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# https://travis-ci.org/#!/translate/pootle
dist: trusty
sudo: true
language: python
services:
- docker
env:
global:
# for this to work you also need to comment out build condition
# as travis' conditions are currently broken
- FORCE_REBUILD=false
- FORCE_REBUILD_DATA=false
cache:
directories:
- pootle/static/js/node_modules
- pootle/assets
- $HOME/virtualenv/python2.7.14/bin
- $HOME/virtualenv/python2.7.14/lib
- $HOME/virtualenv/python2.7/bin
stages:
- name: build
if: branch = master AND type = push
- name: test
# if: branch = DOESNOTEXIST
- name: publish
# we want this to only run on ~release~, master?
if: branch = DOESNOTEXIST
install:
- pip install -qr requirements/host.txt
jobs:
include:
- stage: build
env: TRAVIS_ENV=build
script:
- export DOCKER_USERNAME=${DOCKER_USERNAME:-translatetravis2}
- makey build-travis-images
- stage: test
env: TRAVIS_ENV=linting
script:
- export LOCAL_USER_ID=$UID
- export DOCKER_USERNAME=${DOCKER_USERNAME:-translatetravis2}
- docker-compose -f docker-compose.travis.yml pull --include-deps travis-sqlite
- makey makey-sqlite-travis travis-lint
-
if: type = cron
env: TRAVIS_ENV=sqlite
script:
- export LOCAL_USER_ID=$UID
- export DOCKER_USERNAME=${DOCKER_USERNAME:-translatetravis2}
- docker-compose -f docker-compose.travis.yml pull --include-deps travis-sqlite
- makey makey-sqlite-travis travis-test
-
env: TRAVIS_ENV=postgres
script:
- export LOCAL_USER_ID=$UID
- export DOCKER_USERNAME=${DOCKER_USERNAME:-translatetravis2}
- docker-compose -f docker-compose.travis.yml pull --include-deps travis-postgres
- makey makey-postgres-travis travis-test
-
env: TRAVIS_ENV=mariadb
script:
- export LOCAL_USER_ID=$UID
- export DOCKER_USERNAME=${DOCKER_USERNAME:-translatetravis2}
- docker-compose -f docker-compose.travis.yml pull --include-deps travis-mariadb
- makey makey-mariadb-travis travis-test
- stage: publish
env: TRAVIS_ENV=publish-demo
script:
- makey publish
notifications:
email:
on_failure: always
on_success: change
irc:
on_failure: always
on_success: change
channels:
- "chat.freenode.net#pootle-dev"
use_notice: true
skip_join: true
template:
- "(%{branch} @ %{commit} : %{author}): %{message} %{build_url}"
webhooks:
urls:
- https://webhooks.gitter.im/e/a6e983c90a9617548a6d
on_success: change
on_failure: always
on_start: never