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

Update Travis file and fix build #86

Merged
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
65 changes: 38 additions & 27 deletions .travis.yml
@@ -1,18 +1,6 @@
---
language: php

php:
- 7.3
- 7.1
- 7.0
- 5.6
- 5.5
- 5.4

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

cache:
directories:
- "${HOME}/.composer/cache"
Expand All @@ -21,28 +9,51 @@ env:
global:
- PATH="${HOME}/bin:${PATH}"

matrix:
jobs:
include:
- php: 7.3
name: Linting
stage: lint
before_install:
- npm set loglevel error
- npm set progress false
install:
- npm install -g jsonlint
script:
- find . -type f -name "*.json" -print0 | xargs -0 -n1 jsonlint -q
- composer validate

- stage: test
php: 7.4snapshot
allow_failures: true
- php: 7.3
env: SECURITY=1
- php: 7.2
env: SNIFF=1
- php: 7.1
- php: 7.0
- php: 5.6
- php: 5.5
# As the latest Debian does not support PHP 5.5 anymore, we need to force using 'trusty'.
dist: trusty
- php: 5.4
# As the latest Debian does not support PHP 5.4 anymore, we need to force using 'trusty'.
dist: trusty
- php: 5.3
# As 'trusty' is not supporting PHP 5.2/5.3 anymore, we need to force using 'precise'.
# As the latest Debian does not support PHP 5.3 anymore, we need to force using 'precise'.
dist: precise
script:
- find . -type f -name "*.php" -print0 | xargs -0 -n1 php -l
- travis_wait composer install --no-interaction --no-progress --no-scripts --no-suggest --optimize-autoloader --prefer-dist --verbose
- composer install-codestandards
- ./vendor/bin/phpcs -i
- ./vendor/bin/phpcs -s --standard=PHPCompatibility --runtime-set testVersion "${TRAVIS_PHP_VERSION:0:3}" --exclude=PHPCompatibility.Upgrade.LowPHP ./src/

fast_finish: true

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

install:
- 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
- composer validate
- travis_wait composer install --no-interaction --no-progress --no-scripts --no-suggest --optimize-autoloader --prefer-dist --verbose
- if [[ "$SNIFF" == "1" ]]; then composer install-codestandards; fi
- if [[ "$SNIFF" == "1" ]]; then ./vendor/bin/phpcs; fi
mjrider marked this conversation as resolved.
Show resolved Hide resolved
- ./vendor/bin/security-checker -n security:check --end-point=http://security.sensiolabs.org/check_lock
- composer install-codestandards
- ./vendor/bin/phpcs -i
- ./vendor/bin/phpcs -s --runtime-set testVersion "${TRAVIS_PHP_VERSION:0:3}" --exclude=PHPCompatibility.Upgrade.LowPHP ./src/
- if [[ "$SECURITY" == "1" ]];then ./vendor/bin/security-checker -n security:check --end-point=http://security.symfony.com/check_lock; fi