forked from django-cms/django-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
145 lines (128 loc) · 6.35 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
language: python
python:
- 3.8
- 3.7
- 3.6
- 3.5
- 2.7
sudo: false
services:
- mysql
- postgresql
addons:
apt:
packages:
- enchant
cache:
directories:
- node_modules
- $HOME/.pip/cache
env:
global:
# coveralls
- secure: GzxbqfktWQkf6QQvz0OMk4zHbGI8QWcThTLUzEtktheInxwivOHnoJ1kQu2jVVrk0ZVPbOedE+Cn3QMfi6Wj+y6CREwIhfyzqZV+BIgYu/MpW7vT1BQGiN2suHjFOt/TJ90G41DlBRDc7FxGLqL1Mq8hsEdE0W+/Yszo3aMbp2w=
# sauce labs username
- secure: RotktnZ0AqeTDYfh2O472pPiolQJ2ZDRPUKGDajYWgnG2n94K7hBd4pnA1H/cd42sOyReC3lmmweWNSbG0DLD9+X+s0fwaqKcWGnYsLAcjOWaNXPMwvvgaivadT34JmS9Wv29zNudPL2A6zNw0CB+YVxUZIA4Cm9984AxbYJGSk=
# sauce labs access token
- secure: CbPfysSncBB2Ue+VOtLDa8xJvwKl73nJO647zt/9UvZ/3PilnZN9aZv2jHxGvCiFXcez+2AddKptMCcx/5EW5UfRkrWUDHrfLCULU2TfOjmufEGM1eOIXhiAun8WQ85LBzTAYy1r9D514cbU3Yzn3xGZwJljPE8JE4cx3MNN/qQ=
# temporary solution until https://github.com/ariya/phantomjs/issues/13953 is resolved
- PHANTOMJS_CDNURL=https://s3.amazonaws.com/aldryn-local-assets
# make sure travis jobs are recognised
- DJANGO=1.11
matrix:
include:
# FRONTEND
- python: 3.6
env: FRONTEND=1 UNIT=1
- python: 3.6
env: FRONTEND=1 LINT=1
- python: 3.6
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=1 DJANGO=1.11 DATABASE_URL='sqlite://localhost/testdb.sqlite'
- python: 3.6
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=2 DJANGO=1.11 DATABASE_URL='sqlite://localhost/testdb.sqlite'
- python: 3.6
env: FRONTEND=1 INTEGRATION=1 INTEGRATION_TESTS_BUCKET=3 DJANGO=1.11 DATABASE_URL='sqlite://localhost/testdb.sqlite'
# DJANGO 1.11
- python: 2.7
env: DJANGO=1.11 DATABASE_URL='sqlite://localhost/:memory:'
- python: 3.5
env: DJANGO=1.11 DATABASE_URL='mysql://[email protected]/djangocms_test'
- python: 3.6
env: DJANGO=1.11 DATABASE_URL='postgres://[email protected]/djangocms_test'
- python: 3.6
env: DJANGO=1.11 DATABASE_URL='postgres://[email protected]/djangocms_test' AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 3.6
env: DJANGO=1.11 DATABASE_URL='postgres://[email protected]/djangocms_test' AUTH_USER_MODEL='customuserapp.User'
# DJANGO 2.2
- python: 3.5
env: DJANGO=2.2 DATABASE_URL='sqlite://localhost/:memory:'
dist: xenial
sudo: true
- python: 3.5
env: DJANGO=2.2 DATABASE_URL='mysql://[email protected]/djangocms_test'
- python: 3.6
env: DJANGO=2.2 DATABASE_URL='postgres://[email protected]/djangocms_test'
- python: 3.6
env: DJANGO=2.2 DATABASE_URL='postgres://[email protected]/djangocms_test' AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 3.6
env: DJANGO=2.2 DATABASE_URL='postgres://[email protected]/djangocms_test' AUTH_USER_MODEL='customuserapp.User'
- python: 3.6
env: DJANGO=2.2 TEST_DOCS=1 DATABASE_URL='sqlite://localhost/:memory:'
dist: xenial
sudo: true
- python: 3.7
env: DJANGO=2.2 DATABASE_URL='postgres://[email protected]/djangocms_test' AUTH_USER_MODEL='customuserapp.User'
dist: xenial
sudo: true
# DJANGO 3.0
- python: 3.6
env: DJANGO=3.0 DATABASE_URL='sqlite://localhost/:memory:'
dist: xenial
sudo: true
- python: 3.6
env: DJANGO=3.0 DATABASE_URL='mysql://[email protected]/djangocms_test'
- python: 3.7
env: DJANGO=3.0 DATABASE_URL='postgres://[email protected]/djangocms_test'
- python: 3.7
env: DJANGO=3.0 DATABASE_URL='postgres://[email protected]/djangocms_test' AUTH_USER_MODEL='emailuserapp.EmailUser'
- python: 3.7
env: DJANGO=3.0 DATABASE_URL='postgres://[email protected]/djangocms_test' AUTH_USER_MODEL='customuserapp.User'
- python: 3.7
env: DJANGO=3.0 TEST_DOCS=1 DATABASE_URL='sqlite://localhost/:memory:'
dist: xenial
sudo: true
- python: 3.8
env: DJANGO=3.0 DATABASE_URL='postgres://[email protected]/djangocms_test' AUTH_USER_MODEL='customuserapp.User'
dist: xenial
sudo: true
fast_finish: true
before_script:
- pip freeze
- if [ "$DATABASE_URL" == "postgres://[email protected]/djangocms_test" ]; then psql -c "DROP DATABASE IF EXISTS djangocms_test;" -U postgres; fi
- if [ "$DATABASE_URL" == "postgres://[email protected]/djangocms_test" ]; then psql -c "create database djangocms_test;" -U postgres; fi
- if [ "$DATABASE_URL" == "mysql://[email protected]/djangocms_test" ]; then mysql -e 'create database IF NOT EXISTS djangocms_test CHARACTER SET utf8 COLLATE utf8_general_ci;'; fi
before_install:
- "export TRAVIS_COMMIT_MSG=\"$(git log --format=%B --no-merges -n 1)\""
- pip install -U pip>=8.0
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip saucelabs\]'; export USE_SAUCE_LABS=$?; true
- echo "$TRAVIS_COMMIT_MSG" | grep '\[ci only docs\]'; export ONLY_DOCS=$?; true
install:
- if [ "$UNIT" != 1 ] && [ "$LINT" != 1 ]; then pip install -r "test_requirements/django-$DJANGO.txt"; pip freeze; fi
- if [ "$FRONTEND" == 1 ] && [ "$ONLY_DOCS" != 0 ]; then nvm install 6 && nvm use 6; fi
# Disable the spinner, it looks bad on Travis
- if [ "$FRONTEND" == 1 ] && [ "$ONLY_DOCS" != 0 ]; then npm config set spin false; fi
- if [ "$FRONTEND" == 1 ] && [ "$ONLY_DOCS" != 0 ]; then npm install -g [email protected]; fi
- if [ "$FRONTEND" == 1 ] && [ "$ONLY_DOCS" != 0 ]; then scripts/install-npm-dependencies.sh; fi
- if [ "$UNIT" != 1 ] && [ "$LINT" != 1 ] && [ "$DATABASE_URL" == 'postgres://[email protected]/djangocms_test' ]; then pip install psycopg2 ; fi
- if [ "$UNIT" != 1 ] && [ "$LINT" != 1 ] && [ "$DATABASE_URL" == 'mysql://[email protected]/djangocms_test' ]; then pip install mysqlclient ; fi
script:
- if [ "$FRONTEND" == 1 ] && [ "$UNIT" == 1 ] && [ "$ONLY_DOCS" != 0 ]; then gulp tests:unit; fi;
- if [ "$FRONTEND" == 1 ] && [ "$LINT" == 1 ] && [ "$ONLY_DOCS" != 0 ]; then gulp lint; fi;
- if [ "$FRONTEND" == 1 ] && [ "$INTEGRATION" == 1 ] && [ "$ONLY_DOCS" != 0 ]; then pip install -e .; pip freeze; gulp tests:integration; fi;
- if [ "$FRONTEND" != 1 ] && ([ "$TEST_DOCS" == 1 ] && [ "$ONLY_DOCS" == 0 ] || [ "$ONLY_DOCS" != 0 ]); then coverage run --parallel-mode manage.py test; fi;
- if [ "$FRONTEND" != 1 ] && ([ "$TEST_DOCS" == 1 ] && [ "$ONLY_DOCS" == 0 ] || [ "$ONLY_DOCS" != 0 ]); then coverage combine; fi;
after_success: if [ "$FRONTEND" != 1 ]; then coveralls; fi;
notifications:
irc:
- irc.freenode.org#django-cms
- irc.freenode.org#django-cms-sprint