forked from RackTables/racktables
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
41 lines (36 loc) · 1.55 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
# Ubuntu 18.04 with PHP 7.1, 7.2, 7.3 and 7.4
dist: bionic
language: php
git:
quiet: true
depth: 3
matrix:
fast_finish: true
include:
# PHP 7.0 is not available on U18.04. U16.04 with PHP 7.0 comes with
# PHPUnit 7, which requires PHP >= 7.1 hence does not work. PHPUnit 6.5.14
# on PHP 7.0.33 errors RackTables tests that were updated to meet the
# requirements of PHPUnit 8. Quite oddly, the error message of PHPUnit 6
# after the update resembles the message of PHPUnit 8 before the update:
# "TypeError: Return value of ConfigVarTest::setUp() must be an instance of
# void, none returned"
# That said, outside of Travis CI on a U18.04 host PHPUnit 6.5.5 with
# PHP 7.2.24 works fine, but anyway.
- php: 7.1
# U18.04 with PHP 7.1 comes with PHPUnit 8, which requires PHP >= 7.2
# hence does not work.
env: PHPUNIT_BIN=~/bin/phpunit-7.5.20.phar
- php: 7.2 # PHPUnit 8 by default
- php: 7.3 # PHPUnit 8 by default
- php: 7.4 # PHPUnit 8 by default
services:
- mysql
before_script:
- ./tests/travis_setup_mysql.sh racktables_unittest racktables travistest
- if [ "$PHPUNIT_BIN" != "" ]; then mkdir -p ~/bin && curl -sSfL -o "$PHPUNIT_BIN" https://phar.phpunit.de/${PHPUNIT_BIN##~/bin/} && chmod a+x "$PHPUNIT_BIN"; fi
script:
- ./tests/express_pre.sh
- if [ "$SKIP_PHPUNIT" = yes ]; then echo '(skipped PHPUnit tests on request)'; else ./tests/express_phpunit.sh; fi
- ./tests/express_post.sh
- mysql -u racktables -ptravistest racktables_unittest < scripts/init-sample-racks.sql
- DESTDIR=/tmp make install