2015-07-25 10:23:09 +10:00
|
|
|
language: php
|
|
|
|
|
|
|
|
php:
|
|
|
|
- 7.0
|
2016-10-24 13:14:19 -07:00
|
|
|
- 7.1
|
2018-07-24 09:10:29 -07:00
|
|
|
- 7.2
|
2018-12-30 20:35:16 +02:00
|
|
|
- 7.3
|
2016-10-24 13:14:19 -07:00
|
|
|
- nightly
|
2015-07-25 10:23:09 +10:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
allow_failures:
|
2016-10-24 13:14:19 -07:00
|
|
|
- php: nightly
|
2015-07-25 10:23:09 +10:00
|
|
|
|
2015-07-25 12:06:02 +10:00
|
|
|
sudo: false
|
2015-07-25 10:23:09 +10:00
|
|
|
|
2019-06-24 07:38:41 +08:00
|
|
|
if: type = pull_request OR (type = push AND (branch = develop OR branch = master))
|
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.composer/cache/files
|
|
|
|
|
2016-02-23 11:22:57 -03:00
|
|
|
install:
|
2019-06-24 07:38:41 +08:00
|
|
|
- travis_retry composer install --no-interaction --no-progress --no-suggest
|
2015-07-25 12:06:02 +10:00
|
|
|
|
2015-07-25 12:49:37 +10:00
|
|
|
before_script: git reset --hard HEAD
|
|
|
|
|
2019-06-24 07:38:41 +08:00
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
- code quality
|
|
|
|
- code coverage
|
|
|
|
|
|
|
|
script:
|
|
|
|
- ./vendor/bin/parallel-lint --exclude vendor --exclude storage --exclude tests/fixtures/plugins/testvendor/goto/Plugin.php .
|
|
|
|
- ./vendor/bin/phpunit
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- stage: code coverage
|
|
|
|
if: type = push AND (branch = develop OR branch = master)
|
|
|
|
php: 7.1
|
|
|
|
script:
|
|
|
|
- ./vendor/bin/phpunit --testsuite "October CMS Test Suite" --coverage-clover=coverage.xml
|
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
|
|
|
- stage: code quality
|
|
|
|
if: type = pull_request
|
|
|
|
php: 7.1
|
2019-06-24 13:47:47 +08:00
|
|
|
script:
|
|
|
|
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git fetch
|
2019-09-10 17:42:04 +08:00
|
|
|
- ./vendor/bin/phpcs --colors -nq --report="full" --extensions="php" $(git diff --name-only --diff-filter=ACMR HEAD origin/$TRAVIS_BRANCH)
|
2019-06-24 07:38:41 +08:00
|
|
|
- stage: code quality
|
|
|
|
if: type = push AND (branch = develop OR branch = master)
|
|
|
|
php: 7.1
|
2019-09-10 17:42:04 +08:00
|
|
|
script: ./vendor/bin/phpcs --colors -nq --report="full" --extensions="php" $(git show --name-only --pretty="" --diff-filter=ACMR $TRAVIS_COMMIT)
|