forked from rainlab/builder-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (42 loc) · 1.36 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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:
- wget https://github.com/octobercms/october/archive/develop.zip
- unzip develop.zip && rm develop.zip
- mv october-develop october
- mkdir -p ./october/plugins/rainlab/builder
- mv !(october) october/plugins/rainlab/builder
- mv .travis.yml october/plugins/rainlab/builder
- cd october
- composer install --no-interaction --no-progress --no-suggest
- cp config/cms.php config/testing/cms.php
before_script:
- cd ./plugins/rainlab/builder
script:
- ../../../vendor/bin/parallel-lint .
- ../../../vendor/bin/phpunit
jobs:
include:
- 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 show --name-only --pretty="" $TRAVIS_COMMIT)