Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis: various tweaks #58

Merged
merged 2 commits into from Sep 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 11 additions & 16 deletions .travis.yml
Expand Up @@ -3,54 +3,49 @@ language: php

php:
- hhvm
- 7.2
- 7.1
- 7.0
- 5.6
- 5.5
- 5.4
- 5.3

# This triggers builds to run on the new (faster) TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

# Make sure a `bin` directory is present and does not contain PHAR files more
# than 4 weeks old
before_cache:
- mkdir -p "${HOME}/bin"
- find "${HOME}/bin/" -type f -name '*.phar' -mtime +28 -delete

cache:
directories:
- "${HOME}/.composer/cache"
- "${HOME}/.npm/"
- "${HOME}/bin/"
env:
global:
- PATH="${HOME}/bin:${PATH}"

matrix:
include:
- php: 7.2
env: SNIFF=1
- php: 5.3
# As 'trusty' is not supporting PHP 5.2/5.3 anymore, we need to force using 'precise'.
dist: precise

allow_failures:
- php: hhvm
- php: 5.5
- php: 5.4
- php: 5.3

fast_finish: true

before_install:
- npm set loglevel error
- npm set progress false

install:
- '[[ -f "${HOME}/bin/phpcs.phar" ]] || curl -L -o "${HOME}/bin/phpcs.phar" https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar'
- '[[ -f "${HOME}/bin/security-checker.phar" ]] || curl -L -o "${HOME}/bin/security-checker.phar" http://get.sensiolabs.org/security-checker.phar'
- npm install -g jsonlint

script:
- find . -type f -name "*.json" -print0 | xargs -0 -n1 jsonlint -q
- find . -type f -name "*.php" -print0 | xargs -0 -n1 php -l
- php "${HOME}/bin/phpcs.phar" --standard=psr2 src/
- composer validate
- travis_wait composer install --no-interaction --no-progress --no-scripts --no-suggest --optimize-autoloader --prefer-dist --verbose
- php "${HOME}/bin/security-checker.phar" -n security:check --end-point=http://security.sensiolabs.org/check_lock
- if [[ "$SNIFF" == "1" ]]; then composer install-codestandards; fi
- if [[ "$SNIFF" == "1" ]]; then ./vendor/bin/phpcs; fi
- ./vendor/bin/security-checker -n security:check --end-point=http://security.sensiolabs.org/check_lock
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -30,6 +30,7 @@
},
"require-dev": {
"composer/composer": "*",
"sensiolabs/security-checker": "4.1.5",
"wimg/php-compatibility": "^8.0"
},
"suggest": {
Expand Down