forked from Elgg/Elgg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
174 lines (156 loc) · 5.51 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
language: php
php:
- 7.0
- 7.1
- 7.2
# This helps builds go quicker on Travis since it enables caching of dependencies
# http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false
# Do not limit history to latest commits. Merge commits will need older commits.
# Limiting depth caused issues with /.scripts/travis/check_commit_msgs.sh
#git:
# depth: 1
branches:
except:
- 1.0
- 1.5
- 1.6
- 1.7
- 1.8
matrix:
fast_finish: true
include:
# Commit message and lint
- php: 7.0
env: JOB_NAME=lint VARIA=true
install:
- composer travis:install
script:
- bash .scripts/travis/check_commit_msgs.sh
- composer lint
# Build and test javascript
- php: 7.0
env: JOB_NAME=js_tests VARIA=true
dist: trusty
install:
- npm install -g yarn && yarn
before_script:
- composer travis:install
script:
- yarn test
# Build docs and check for errors
# Flags used here, not in `make html`:
# -n Run in nit-picky mode. Currently, this generates warnings for all missing references.
# -W Turn warnings into errors. This means that the build stops at the first warning and sphinx-build exits with exit status 1.
- php: 7.0
env: JOB_NAME=docs_build VARIA=true
install:
- pip install --user "Sphinx==1.3.1"
- pip install --user "sphinx-intl"
- export PATH=$PATH:$HOME/.local/bin
script:
- composer docs:build
# Memcached enabled
- php: 7.0
services:
- memcached
- mysql
env:
- JOB_NAME=memcache_php56 VARIA=true
- ELGG_MEMCACHE=1
- ELGG_MEMCACHE_SERVER1_HOST=127.0.0.1
- ELGG_MEMCACHE_SERVER1_PORT=11211
- ELGG_MEMCACHE_NAMESPACE_PREFIX=elgg_
before_install:
- phpenv config-rm xdebug.ini
- phpenv config-add ./.scripts/travis/memcached.ini
- composer config -g github-oauth.github.com ${GITHUB_TOKEN}
before_script:
- php -f ./.scripts/is_memcached_enabled.php
script:
- curl -s http://localhost:8888/ | tac | tac | grep -q "<title>Elgg Travis Site</title>"
- ./vendor/bin/phpunit
# Redis enabled
- php: 7.0
services:
- redis-server
- mysql
env:
- JOB_NAME=redis VARIA=true
- ELGG_REDIS=1
- ELGG_REDIS_SERVER1_HOST=127.0.0.1
- ELGG_REDIS_SERVER1_PORT=6379
before_install:
- phpenv config-rm xdebug.ini
- phpenv config-add ./.scripts/travis/redis.ini
- composer config -g github-oauth.github.com ${GITHUB_TOKEN}
before_script:
- php -f ./.scripts/is_redis_enabled.php
script:
- curl -s http://localhost:8888/ | tac | tac | grep -q "<title>Elgg Travis Site</title>"
- ./vendor/bin/phpunit
# Test upgrade path from 2.3
- php: 7.0
env: JOB_NAME=upgrade_from_Elgg2 VARIA=true
install:
- git fetch origin 2.3
- git checkout FETCH_HEAD
- composer travis:install-with-mysql
- php -f ./.scripts/travis/enable_plugins.php
- php -f ./.scripts/seeder/seed.php # can't use elgg-cli because it's a 2.3 install
- git checkout -
- composer install --prefer-dist
- php ./elgg-cli upgrade async
- php -S localhost:8888 -c ./.scripts/travis/local_php_server.ini index.php &
- sleep 3 # give Web server some time to bind to sockets, etc
script:
- curl -s http://localhost:8888/ | tac | tac | grep -q "<title>Elgg Travis Site</title>"
- ./vendor/bin/phpunit
# HHVM not officially supported https://github.com/Elgg/Elgg/issues/11185
services:
- mysql
before_install:
- phpenv config-rm xdebug.ini
- composer config -g github-oauth.github.com ${GITHUB_TOKEN}
install:
- composer travis:install-with-mysql
- php -f ./.scripts/travis/enable_plugins.php
- php ./elgg-cli database:seed --limit=5 -vv
- php -S localhost:8888 -c ./.scripts/travis/local_php_server.ini index.php &
- sleep 3 # give Web server some time to bind to sockets, etc
script:
- curl -s http://localhost:8888/ | tac | tac | grep -q "<title>Elgg Travis Site</title>"
- php ./elgg-cli simpletest -p all -v
# in this build, we want to make sure the test suites can bootstrap on their own
# combined test runner is executed in e2e builds
- ./vendor/bin/phpunit --testsuite unit
- ./vendor/bin/phpunit --testsuite integration
- ./vendor/bin/phpunit --testsuite plugins
after_script:
- php ./elgg-cli database:unseed -vv
notifications:
email:
secure: exC/ws07lLOj3Y43C89jiaKpyB8Yt7DPGSCShV4R3Wkw/hVVzjxt1BinPxzsyL5DC7APUMcTHGOhDB2oCE4ynDE6o6L9bH79fc+V8IYAiNaEIGL0AOuHdnRdGN9GMrr2jv78cZ5MctuUTkeYLaoOEyDGHmkMhqa6SufIDAY8b58=
webhooks:
urls:
- secure: "Ug81+4Fa2UFZetSCV79OWOgYi4uVgNQ6rVrVn2HElddOMDwuHxo9CYKoA3Q+joPKMtNFCN2qkMyoyUfIMM83uJi1LmaUx/c7lR1pXBFVgc4Xyt114NcY80I4OCWWKg0G1FDlSiaXil922JjeC3MekYoqjsIyUgabGihe6j7DWz0="
on_start: true
slack:
secure: elgg:qUNTV70bSXTkIdr7b4FjvFhm
on_failure: always
on_success: never
env:
global:
- ELGG_DB_PREFIX=t_i_elgg_
- ELGG_DB_HOST=localhost
- ELGG_DB_NAME=elgg
- ELGG_DB_USER=root
- ELGG_DB_PASS=password
- ELGG_WWWROOT=http://localhost:8888/
secure: "fdpCjdC0Qp/ZJqtrCHE4I/tHXWF1sORftm6khd6geqK7d4qWzIh6HzNN2BlF+2m4nyuyxo2wzPm/oGoqogVpBgrzpQ7SZl7h2/wzgs2C/k39sFGyDisLesTM5DhBDJWcomyqtcnQmKn340Z9KOxiHAt4FOj2FZVN5+tIO5j3Cks="
## Cache dependencies
cache:
yarn: true
directories:
- $HOME/.composer/cache
- $HOME/.npm