fixup the RackTables web-site URL
[racktables] / .travis.yml
1 # Ubuntu 18.04 with PHP 7.1, 7.2, 7.3 and 7.4
2 dist: bionic
3 language: php
4
5 git:
6 quiet: true
7 depth: 3
8
9 matrix:
10 fast_finish: true
11 include:
12 # PHP 7.0 is not available on U18.04. U16.04 with PHP 7.0 comes with
13 # PHPUnit 7, which requires PHP >= 7.1 hence does not work. PHPUnit 6.5.14
14 # on PHP 7.0.33 errors RackTables tests that were updated to meet the
15 # requirements of PHPUnit 8. Quite oddly, the error message of PHPUnit 6
16 # after the update resembles the message of PHPUnit 8 before the update:
17 # "TypeError: Return value of ConfigVarTest::setUp() must be an instance of
18 # void, none returned"
19 # That said, outside of Travis CI on a U18.04 host PHPUnit 6.5.5 with
20 # PHP 7.2.24 works fine, but anyway.
21 - php: 7.1
22 # U18.04 with PHP 7.1 comes with PHPUnit 8, which requires PHP >= 7.2
23 # hence does not work.
24 env: PHPUNIT_BIN=~/bin/phpunit-7.5.20.phar
25 - php: 7.2 # PHPUnit 8 by default
26 - php: 7.3 # PHPUnit 8 by default
27 - php: 7.4 # PHPUnit 8 by default
28
29 services:
30 - mysql
31
32 before_script:
33 - ./tests/travis_setup_mysql.sh racktables_unittest racktables travistest
34 - 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
35
36 script:
37 - ./tests/express_pre.sh
38 - if [ "$SKIP_PHPUNIT" = yes ]; then echo '(skipped PHPUnit tests on request)'; else ./tests/express_phpunit.sh; fi
39 - ./tests/express_post.sh
40 - mysql -u racktables -ptravistest racktables_unittest < scripts/init-sample-racks.sql
41 - DESTDIR=/tmp make install