-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
53 lines (53 loc) · 1.45 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
language: php
php:
- 7.4
- nightly
jobs:
allow_failures:
- php: nightly
sudo: true
env:
global:
- CC_TEST_REPORTER_ID=613b733b54821d91a3fe4dd2b408a08cd0bb3550ef88fb2bbad3400bcdd336dc
cache:
directories:
- $HOME/.composer/cache
services:
- docker
before_script:
- |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter;
chmod +x ./cc-test-reporter;
curl -L https://phar.phpunit.de/phploc.phar > ./phploc;
chmod +x ./phploc;
./cc-test-reporter before-build;
script:
- |
set -e;
composer update --prefer-stable --no-interaction --no-suggest;
composer cs;
composer build-phar;
composer test-coverage;
./phploc --log-json=phploc.json src;
if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" ]] && [[ $TRAVIS_PULL_REQUEST == "false" ]]; then composer build-docs; fi;
after_script:
- |
if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.4" ]] && [[ $TRAVIS_PULL_REQUEST == "false" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi;
deploy:
- provider: pages
local_dir: site
skip_cleanup: true
github_token: $GITHUB_TOKEN
keep_history: true
target_branch: gh-pages
on:
branch: main
condition: ${TRAVIS_PHP_VERSION:0:3} == "7.4"
- provider: releases
api_key: $GITHUB_TOKEN
file: bin/dog.phar
skip_cleanup: true
draft: true
on:
tags: true
condition: ${TRAVIS_PHP_VERSION:0:3} == "7.4"