Skip to content

Commit

Permalink
fix travis
Browse files Browse the repository at this point in the history
  • Loading branch information
yuichiis committed Apr 18, 2020
1 parent 9810fa3 commit 8c823e5
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@ php:
- '7.3'
- '7.4'

before_install:
- phpenv config-add tests/travis/php$TRAVIS_PHP_VERSION.ini

install:
- export TRAVIS_PHP_VERSION; sh tests/travis/install-script.sh

script:
- vendor/bin/phpunit -c tests
- TRAVIS_SKIP_TEST=1; export TRAVIS_SKIP_TEST; sh tests/travis/run-test.sh
8 changes: 8 additions & 0 deletions tests/travis/install-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

composer install

#case "$TRAVIS_PHP_VERSION" in
# 5\.6) composer require --dev "phpunit/phpunit 5.*" ;;
# 7\.*) composer require --dev "phpunit/phpunit 6.*" ;;
#esac
2 changes: 2 additions & 0 deletions tests/travis/php7.2.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
extension = apcu.so
apc.enable_cli = 1
3 changes: 3 additions & 0 deletions tests/travis/php7.3.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
extension = apcu.so
extension = mongodb.so
apc.enable_cli = 1
3 changes: 3 additions & 0 deletions tests/travis/php7.4.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
extension = apcu.so
extension = mongodb.so
apc.enable_cli = 1
8 changes: 8 additions & 0 deletions tests/travis/run-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

if [ -e vendor/bin/phpunit ]; then
PHPUNITDIR="vendor/bin/"
else
PHPUNITDIR=""
fi
${PHPUNITDIR}phpunit -c tests

0 comments on commit 8c823e5

Please sign in to comment.