-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
29 lines (24 loc) · 1.02 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
language: php
php:
- "7.3"
- "7.4"
- "8.0"
env:
global:
# This is a write-only ID that can only post test reports.
- CC_TEST_REPORTER_ID=7d37e7331b1457f8c3a1857f8bd93a33c720f54dfd8bae66fa2a0fed468a3118
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
- XDEBUG_MODE=coverage
install:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --no-interaction
- 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:
- mkdir -p build
- vendor/bin/phpunit
after_success:
- travis_retry php vendor/bin/php-coveralls --coverage_clover build/cov.xml --json_path build/coverage.json
- cp build/cov.xml clover.xml
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --coverage-input-type clover --exit-code $TRAVIS_TEST_RESULT; fi