Skip to content

Commit

Permalink
Merge pull request #86 from potherca-contrib/ci-build/update-security…
Browse files Browse the repository at this point in the history
…-checker

Update Travis file and fix build
  • Loading branch information
mjrider committed Sep 20, 2019
2 parents e749410 + 27eea54 commit dda5b1d
Showing 1 changed file with 38 additions and 27 deletions.
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
- ./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

0 comments on commit dda5b1d

Please sign in to comment.