-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
61 lines (47 loc) · 1.66 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
language: php
services:
- mysql
php:
- 5.5
- 5.6
- 7.0
matrix:
fast_finish: true
allow_failures:
- php: 7.0
# Cache Composer & Drush directories.
cache:
directories:
- $HOME/.composer/cache
install:
# Create database
- mysql -e 'create database IF NOT EXISTS intraface_test;'
- travis_retry composer self-update && composer --version
- travis_retry composer install --prefer-dist --no-interaction
# Setup database for unit tests
- php tests/unit/setup_database.php
# Generating the selenium test suite file
- php tests/selenium/generate_test_suite.php
# Setup display for selenium
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 5
# Get selenium
#- wget http://selenium.googlecode.com/files/selenium-server-standalone-2.37.0.jar
#- java -jar selenium-server-standalone-2.37.0.jar > /dev/null 2>&1 &
#- nc -zvv localhost 4444; out=$?; while [[ $out -ne 0 ]]; do echo "Retry hit port 4444..."; nc -zvv localhost 4444; out=$?; sleep 5; done
# Start simple HTTP-Server
- cd src/intraface.dk
#- python -m SimpleHTTPServer 8080 > /dev/null 2>&1 &
before_script:
- mkdir -p ../../build/logs
- cd ../../tests/unit
script:
- ../../vendor/bin/phpunit --coverage-clover ../../build/logs/clover.xml --verbose --configuration phpunit.example.xml .
- ../../vendor/bin/phpcs --standard=../../phpcs.xml ../../src/Intraface
- ../../vendor/bin/phpcs --standard=../../phpcs.xml ../../tests/unit
#- java -jar ../../senium-server-standalone-2.37.0.jar -htmlSuite "*firefox" "http://127.0.0.1:8080" "../selenium/testSuite.html" "testResults.html"
after_script:
- cd ../../
- php vendor/bin/coveralls -v