forked from phpList/phplist3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.dotgitlab-ci.yml
37 lines (33 loc) · 1.25 KB
/
.dotgitlab-ci.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
# Configuration file for running the test suite. Results will be at https://travis-ci.com/phpList/phplist3
# whitelist
language: php
php:
- 7.0
- 5.6
- 5.5
- 5.4
- 5.3
before_script:
- sudo apt-get update > /dev/null
- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-curl php5-mysql php5-intl
# Set a custom vhost
- sudo sed -i -e "s,/var/www,$(pwd)/public_html,g" /etc/apache2/sites-available/default
- sudo sed -i -e "/DocumentRoot/i\ServerName phplist.dev" /etc/apache2/sites-available/default
- echo "127.0.0.1 phplist.dev" | sudo tee -a /etc/hosts
- sudo /etc/init.d/apache2 restart
- sudo cp -f tests/travis-ci/behat.yml behat.yml
- sudo cp -f tests/travis-ci/config.php public_html/lists/config/config.php
- composer self-update
- composer install --prefer-dist
- cd vendor/bin && ln -s ../njoannidi/php-lint-bash/phpLint && cd ../../
- ls -l vendor/bin
# Set MySQL configuration and create the database.
- mysql -e 'SET GLOBAL wait_timeout = 5400;'
- mysql -e 'create database phplistdb;'
script:
- vendor/bin/phpLint ./public_html
- vendor/bin/behat
after_failure:
- echo "Failures detected. Outputing additional logs:"
- sudo cat /var/log/apache2/error.log
- sudo cat /var/log/mysql/error.log