-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
68 lines (66 loc) · 2.79 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
# NO: sudo: required
dist: bionic # https://docs.travis-ci.com/user/ci-environment/
language: php
php:
- 7.2
env:
global:
- SELENIUM_SERVER="ondemand.saucelabs.com"
# - SELENIUM_SERVER="hub.browserstack.com"
# - SELENIUM_SERVER="localhost"
- SCREENSHOTS_PATH=""
- APP_HOST="presenze.iubar.it"
matrix:
# Test should be runned in sequence and not in parallel because there are some security checks (about sessions management) on the login feature of the webapp
# see: https://blog.travis-ci.com/2014-07-18-per-repository-concurrency-setting/
- BROWSER="chrome"
- BROWSER="firefox"
# - BROWSER="safari" # php-webdriver doesn't support the w3c protocol used by Safari
before_script:
- cat /etc/os-release
- php -v
- php ./script/before_script.php
# NO: - sudo apt-get -y remove libcurl4-gnutls-dev
# NO: - sudo apt-get -y install libcurl4-openssl-dev
# - wget http://presenze.iubar.it/2_presenze.it.crt
# - wget http://presenze.iubar.it/cacert.pem
# - curl -s http://presenze.iubar.it/1_root_bundle.crt | sudo tee -a /etc/ssl/certs/ca-certificates.crt
# - composer self-update
- composer require --dev jakub-onderka/php-parallel-lint
- composer require --dev jakub-onderka/php-console-highlighter
- composer install --prefer-source --no-suggest --no-progress --no-interaction
- vendor/bin/parallel-lint --exclude vendor .
- vendor/bin/phpstan -V
- vendor/bin/phpstan analyse tests --no-interaction --no-progress --level 0 || true
#
#
# Download and run Selenium (+ https://github.com/jarib/selenium-travis)
# - "wget http://selenium-release.storage.googleapis.com/2.43/selenium-server-standalone-2.43.1.jar"
# - "java -jar selenium-server-standalone-2.43.1.jar > /dev/null &"
# Use xvfb
#- "export DISPLAY=:99.0"
#- "sh -e /etc/init.d/xvfb start"
#- sleep 3 # give xvfb some time to start
#
#
# BrowserStack (da riportare su script bash, vedi https://github.com/travis-ci/travis-ci/issues/879)
# - wget http://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip
# - unzip BrowserStackLocal-linux-x64.zip
# - ./BrowserStackLocal $BROWSERSTACK_ACCESS_KEY localhost,8001,0 > /dev/null &
# - sleep 10
script: phpunit
addons:
sauce_connect: true # !!!
notifications:
email:
recipients:
- ${EMAIL_BORGO}
on_success: change # options: [always|never|change] default: change
on_failure: always # options: [always|never|change] default: always
webhooks:
urls:
# - http://iubar.it/notification?secret=${IUBAR_WH_TOKEN}
- https://webhooks.gitter.im/e/${GITTER_IM_TOKEN}
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: never