Skip to content

Commit

Permalink
update config for Travis CI
Browse files Browse the repository at this point in the history
remove PHP 5.5 + HHVM, add PHP 7.[123]; add test matrix; add support scripts for CI in composer.json
  • Loading branch information
mjaschen committed Sep 16, 2019
1 parent 3d03540 commit 2493a36
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 4 deletions.
44 changes: 40 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,46 @@
language: php

cache:
directories:
- vendor
- $HOME/.composer/cache

env:
matrix:
- DEPENDENCIES=latest
- DEPENDENCIES=oldest

install:
- >
echo;
if [ "$DEPENDENCIES" = "latest" ]; then
echo "Installing the latest dependencies";
composer update --with-dependencies
else
echo "Installing the lowest dependencies";
composer update --with-dependencies --prefer-lowest
fi;
composer show;
php:
- 5.5
- 5.6
- 7.0
- hhvm
- 7.1
- 7.2
- 7.3

install:
- travis_retry composer install --no-interaction
script:
- >
echo;
echo "Validating the composer.json";
composer validate --no-check-all --no-check-lock --strict;
- >
echo;
echo "Linting all PHP files";
composer ci:lint;
- >
echo;
echo "Running the PHPUnit tests";
composer ci:tests;
14 changes: 14 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,19 @@
"psr-0" : {
"Iamstuartwilson\\" : "src/"
}
},
"scripts": {
"ci:lint": "find config src tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l",
"ci:tests": "./vendor/bin/phpunit tests/",
"ci:static": [
"@ci:lint"
],
"ci:dynamic": [
"@ci:tests"
],
"ci": [
"@ci:static",
"@ci:dynamic"
]
}
}

0 comments on commit 2493a36

Please sign in to comment.