-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
27 lines (23 loc) · 905 Bytes
/
.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
language: php
php:
- '7.3'
- '7.4'
before_script:
- 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
- travis_retry composer self-update
- travis_retry composer install --no-interaction --prefer-source
script:
# Fail the Travis CI build on the first error.
- set -e
- mkdir -p build/logs
- php vendor/bin/phpcs --standard=PSR2 src
- php vendor/bin/phpcs --standard=PSR1 tests
- php vendor/bin/phpstan analyze --level max src
- wget https://phar.phpunit.de/phploc.phar
- chmod 0755 phploc.phar
- sudo mv phploc.phar /usr/local/bin/phploc
- vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
after_script:
- if [[ ! -z "$CC_TEST_REPORTER_ID" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi