This repository has been archived by the owner on Jan 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (63 loc) · 2.52 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
language: php
dist: trusty
sudo: false
env:
global:
secure: rxc2jWPEEbwd6JQJdjzoMH8hDR0/Bks0KGQYQyS/VsJsSzX/oW3vQhdvdRAqhBitQdTFOFXLwr3JFPxXBhOLvElmEV4fZcz0hckaVsW2zoS2rI/PQtiDDCJkYEH9CyUztU0tYc3s5o0giaTiAUM7oaww8IlOwVqBA+HftHEWLiY=
mysql:
database: entity_xliff_test
username: root
encoding: utf8
addons:
apt:
packages:
- libxml2-dev
- php5-cgi
- php5-mysql
- php5-cli
- php5-curl
- php5-gd
- php5-common
env:
global:
- DB_USER=root
- DB_PW=entity_xliff_test_password
- DB_NAME=entity_xliff_test
matrix:
include:
- php: "5.5"
env: BDD=true
- php: "5.6"
env: BDD=true
- php: "7.0"
env: BDD=true
- php: "7.1"
env: BDD=false
before_install:
# Update composer
- composer self-update
- if [ $BDD = 'true' ] ; then phpenv config-add test/travis.php.ini ; fi
install:
# Install requisite PHP libraries.
- composer install --prefer-dist
# Install drush.
- if [ $BDD = 'true' ] ; then composer global require drush/drush:6.x-dev ; fi
- if [ $BDD = 'true' ] ; then export PATH="$HOME/.composer/vendor/bin:$TRAVIS_BUILD_DIR/vendor/bin:$PATH" ; fi
before_script:
# Install a copy of Drupal for behavioral tests.
- if [ $BDD = 'true' ] ; then echo "USE mysql;\nUPDATE user SET password=PASSWORD('$DB_PW') WHERE user='$DB_USER';\nFLUSH PRIVILEGES;\n" | mysql -u root ; fi
- if [ $BDD = 'true' ] ; then ./test/scripts/install_drupal.sh ; fi
# Start a server where Drupal can be accessed.
- if [ $BDD = 'true' ] ; then pushd build/drupal ; fi
- if [ $BDD = 'true' ] ; then (drush runserver 127.0.0.1:8181 --browser=0 > /dev/null 2>&1 &) ; fi
- if [ $BDD = 'true' ] ; then (while echo | telnet localhost 8181 2>&1 | grep -qe 'Connection refused'; do echo "Connection refused on port 8181. Waiting 5 seconds..."; sleep 5; done) ; fi
- if [ $BDD = 'true' ] ; then popd ; fi
script:
- phpunit --coverage-text --coverage-clover build/logs/clover.xml
- if [ $BDD = 'true' ] ; then behat --suite=entityTranslation --verbose ; fi
# Disable entity_translation to run content translation tests.
- if [ $BDD = 'true' ] ; then pushd build/drupal && drush dis entity_translation --y && popd ; fi
- if [ $BDD = 'true' ] ; then behat --suite=contentTranslation --verbose ; fi
after_script:
- ./vendor/bin/test-reporter --stdout > build/logs/coverage.json
- "curl -X POST -d @build/logs/coverage.json -H 'Content-Type: application/json' -H 'User-Agent: Code Climate (PHP Test Reporter v1.0.1-dev)' https://codeclimate.com/test_reports"