-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
72 lines (63 loc) · 2.38 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
language: php
php:
# Xenial only comes with 7.0. Sure, Travis installed other PHP versions, but
# only their CLI versions. Nice for testing PHPUnit but not for testing LOVD.
# We could maybe use php-fpm to fix that, but we require a lot of other packages:
# https://docs.travis-ci.com/user/languages/php/#apache--php
- 7.0
env:
# Let Selenium use Firefox driver.
# - LOVD_SELENIUM_DRIVER=firefox # 2020-07-21: Disabled, Travis' FF has been failing for weeks, reason unknown.
# Let Selenium use Chrome driver.
- LOVD_SELENIUM_DRIVER=chrome
os: linux
# xenial = 16.04 LTS. PHP 7.0. Next is bionic (18.04), with PHP 7.2.
# xenial comes with Firefox 63.0.1 (use addons: firefox: "76.0" or so to upgrade), and MySQL 5.7.
# xenial is the current default (2020-05-11) and probably will be for a while (2021?), Travis normally lags behind 3 years.
dist: xenial
git:
depth: 1
addons:
chrome: stable
apt:
packages:
- mutt # For mailing screenshots if uploading fails.
- apache2
- libapache2-mod-php
- php-curl
- php-gd
- php-json
- php-mbstring
- php-mysql
- php-zip # For uploading files.
- exim4
- jq # For using file.io.
services:
- mysql
- xvfb
before_install:
- ./tests/travis/setup/setup_mysql.sh
- ./tests/travis/setup/setup_apache.sh --githubaccount=LOVDnl
- ./tests/travis/setup/setup_php.sh
- ./tests/travis/setup/setup_config.sh
- ./tests/travis/setup/setup_selenium_server.sh
before_script:
- firefox --version
- google-chrome --version
script:
# Use vendor/bin/phpunit to start tests.
# Run all test suites, starting at the unit tests.
- vendor/bin/phpunit -v --configuration ./tests/unit_tests/phpunit.xml
- vendor/bin/phpunit -v --configuration ./tests/selenium_tests/phpunit.xml --testsuite admin_tests
- vendor/bin/phpunit -v --configuration ./tests/selenium_tests/phpunit.xml --testsuite manager_tests
- vendor/bin/phpunit -v --configuration ./tests/selenium_tests/phpunit.xml --testsuite curator_tests
- vendor/bin/phpunit -v --configuration ./tests/selenium_tests/phpunit.xml --testsuite collaborator_tests
- vendor/bin/phpunit -v --configuration ./tests/selenium_tests/phpunit.xml --testsuite submitter_tests
notifications:
email:
recipients:
on_success: never
## [always|never|change] # default: change
on_failure: always
## [always|never|change] # default: always