This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
65 lines (54 loc) · 1.56 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
env:
global:
- CC_TEST_REPORTER_ID=8ee4df2235e6338bf10d28298db37e6f8b1a7e3526619826a3290cb14af9da1d
language: php
branches:
only:
- master
- /^[0-9]+\.[0-9]+$/
- /^[0-9]+\.[0-9]+\.[0-9]+$/
sudo: false
cache:
directories:
- $HOME/.composer/cache
matrix:
fast_finish: true
include:
- php: 5.5
env: TYPO3_VERSION=^7.6 PHPSTAN=0
- php: 5.6
env: TYPO3_VERSION=^7.6 PHPSTAN=0
- php: 7.0
env: TYPO3_VERSION=^7.6 PHPSTAN=1
- php: 7.0
env: TYPO3_VERSION=^8.7 PHPSTAN=1
- php: 7.1
env: TYPO3_VERSION=^7.6 PHPSTAN=1
- php: 7.1
env: TYPO3_VERSION=^8.7 PHPSTAN=1
before_install:
- composer self-update
- composer --version
before_script:
- composer require typo3/cms=$TYPO3_VERSION
# Restore composer.json
- git checkout composer.json
- export TYPO3_PATH_WEB=$PWD/build/web
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- >
echo;
echo "Running unit tests";
build/bin/phpunit --colors --coverage-clover build/logs/clover.xml
- >
echo;
echo "Running PHP PSR-2 Coding Standards Checks";
build/bin/phpcs --standard=PSR2 --warning-severity=0 src/ tests/
- >
echo;
echo "Running PHP Static Analysis";
if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.8 && build/bin/phpstan analyse -c phpstan.neon -l 7 src tests; fi
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT