forked from ushahidi/platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (61 loc) · 1.88 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
sudo: false
dist: precise
#notifications:
# slack:
# secure: NxhzhKGYnZYZiWVZM4w1PlZpTy9bbmNlvbqjL+9d4PvK4hFzPwQU12CchhBPeXNGLWBHg/ti6Scn/t5XIS3YJrkk4ydWmJBht5UId8uFZ1A7GCUnNNPTt2RG55lbJJdZSj01rOGZjEQbE5RyckEjgRzhZjdZ+HsjoPaRzWIBrvE=
language: php
php:
- '7.0'
- '7.1'
- 'nightly'
env:
- coverage="--coverage"
- coverage=""
matrix:
exclude:
- php: '7.1'
env: coverage="--coverage"
- php: 'nightly'
env: coverage="--coverage"
allow_failures:
- env: coverage="--coverage"
- php: 'nightly'
fast_finish: true
cache:
directories:
- "$HOME/.composer/cache"
services:
- mysql
before_install:
- mysql -e 'CREATE DATABASE ushahidi;'
- mysql -e "select version();"
- mysql -e "SET GLOBAL sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"
- cp .env.travis .env
install:
- composer install --no-interaction
before_script:
- composer pre-test
- if [ "${coverage}" == "" ]; then (cd httpdocs/; php -S localhost:8000 -t . index.php &) fi
- if [ "${coverage}" != "" ]; then (cd httpdocs/; php -S localhost:8000 -t . coverage.php &) fi
- mysql -e 'SET @@GLOBAL.wait_timeout=1800'
script:
- if [ "${coverage}" == "" ]; then composer test; fi
- if [ "${coverage}" != "" ]; then composer run coverage --timeout=0; fi
- composer lint
after_success:
- if [ "${coverage}" != "" ]; then travis_retry bin/coveralls -v; fi
### Deploy files now generated by Codeship
# before_deploy:
# - bin/release ${TRAVIS_TAG:-$TRAVIS_COMMIT}
# deploy:
# - provider: releases
# api_key:
# secure: C9dRB0X6/QWeKMIdDnuItGzzcJITf5oeGSd/Ry85//DawkC1nZn7yhjOFJuzOT1W8+lrmYgOtqVWaZdKuw36CEa4iooXCwDqn+6SWL1N/Q0JkJZH/pXkjSjtkfRV9iNlSRw3DF1yAcout1piqbD4BKDcAtrIf5apGQnXGzKjn/Q=
# file: build/*
# file_glob: true
# skip_cleanup: true
# on:
# repo: ushahidi/platform
# php: 5.5
# tags: true
# all_branches: true