winter/.travis.yml
Ben Thomson 95b9a8a9fd
Fix Travis CI file scope (#4408)
Original PR (#4394) was picking up changes from other branches as well as from `master`. This change should limit the scope of files to just the changed files in this PR.
2019-06-24 13:47:47 +08:00

54 lines
1.4 KiB
YAML

language: php
php:
- 7.0
- 7.1
- 7.2
- 7.3
- nightly
matrix:
allow_failures:
- php: nightly
sudo: false
if: type = pull_request OR (type = push AND (branch = develop OR branch = master))
cache:
directories:
- $HOME/.composer/cache/files
install:
- travis_retry composer install --no-interaction --no-progress --no-suggest
before_script: git reset --hard HEAD
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
script:
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git fetch
- ./vendor/bin/phpcs --colors -nq --report="full" --extensions="php" $(git diff --name-only HEAD origin/$TRAVIS_BRANCH)
- stage: code quality
if: type = push AND (branch = develop OR branch = master)
php: 7.1
script: ./vendor/bin/phpcs --colors -nq --report="full" --extensions="php" $(git diff --name-only $TRAVIS_COMMIT)