Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Commit ad4b898

Browse files
committed
Updated travis configuration
- added coveralls configuration - updated composer scripts to be consistent with other repositories - updated .gitignore - updated CONTRIBUTING.md guide
1 parent 3a38fd5 commit ad4b898

File tree

8 files changed

+190
-113
lines changed

8 files changed

+190
-113
lines changed

.coveralls.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
coverage_clover: clover.xml
2+
json_path: coveralls-upload.json

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/test export-ignore
2-
/vendor export-ignore
2+
.coveralls.yml
33
.gitattributes export-ignore
44
.gitignore export-ignore
55
.travis.yml export-ignore
6-
phpunit.xml.dist export-ignore
76
phpcs.xml export-ignore
7+
phpunit.xml.dist export-ignore

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
vendor/
2+
phpunit.xml
3+
clover.xml
4+
coveralls-upload.json

.travis.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,23 @@ language: php
55
cache:
66
directories:
77
- $HOME/.composer/cache
8+
- $HOME/.local
89
- vendor
910

1011
env:
1112
global:
12-
- COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"
13+
- COMPOSER_ARGS="--no-interaction"
14+
- COVERAGE_DEPS="satooshi/php-coveralls"
1315

1416
matrix:
15-
fast_finish: true
1617
include:
1718
- php: 5.6
1819
env:
1920
- DEPS=lowest
2021
- php: 5.6
2122
env:
2223
- DEPS=locked
24+
- TEST_COVERAGE=true
2325
- php: 5.6
2426
env:
2527
- DEPS=latest
@@ -29,7 +31,7 @@ matrix:
2931
- php: 7
3032
env:
3133
- DEPS=locked
32-
- CHECK_CS=true
34+
- CS_CHECK=true
3335
- php: 7
3436
env:
3537
- DEPS=latest
@@ -55,18 +57,24 @@ matrix:
5557
- php: hhvm
5658

5759
before_install:
60+
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
5861
- travis_retry composer self-update
5962

6063
install:
64+
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
6165
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
6266
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
6367
- travis_retry composer install $COMPOSER_ARGS
64-
- composer info
68+
- composer show
6569

6670
script:
67-
- composer test
68-
- if [[ $CHECK_CS == 'true' ]]; then composer cs ; fi
69-
- if [[ $CHECK_CS == 'true' ]]; then composer license-check ; fi
71+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
72+
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi
73+
- if [[ $CS_CHECK == 'true' ]]; then composer license-check ; fi
74+
75+
after_script:
76+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi
7077

7178
notifications:
72-
email: true
79+
irc: "irc.freenode.org#zftalk.dev"
80+
email: false

CONTRIBUTING.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,17 @@ To run tests:
4141
- Clone the repository:
4242

4343
```console
44-
$ git clone git@github.com:zendframework/zend-expressive-zendviewrenderer.git
44+
$ git clone git://github.com/zendframework/zend-expressive-zendviewrenderer.git
4545
$ cd zend-expressive-zendviewrenderer
4646
```
4747

4848
- Install dependencies via composer:
4949

5050
```console
51-
$ curl -sS https://getcomposer.org/installer | php --
52-
$ ./composer.phar install
51+
$ composer install
5352
```
5453

55-
If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/
54+
If you don't have `composer` installed, please download it from https://getcomposer.org/download/
5655

5756
- Run the tests using the "test" command shipped in the `composer.json`:
5857

@@ -75,31 +74,42 @@ section on running tests.
7574
To run CS checks only:
7675

7776
```console
78-
$ composer cs
77+
$ composer cs-check
7978
```
8079

8180
To attempt to automatically fix common CS issues:
8281

83-
8482
```console
8583
$ composer cs-fix
8684
```
8785

8886
If the above fixes any CS issues, please re-run the tests to ensure
8987
they pass, and make sure you add and commit the changes after verification.
9088

89+
## Running License Checks
90+
91+
File-level docblocks should follow the format demonstrated in `.docheader`. To
92+
check for conformity, use:
93+
94+
```console
95+
$ composer license-check
96+
```
97+
98+
This will flag files that are incorrect, which you can then update. Re-run the
99+
tool to verify your changes.
100+
91101
## Recommended Workflow for Contributions
92102

93103
Your first step is to establish a public repository from which we can
94104
pull your work into the master repository. We recommend using
95105
[GitHub](https://github.com), as that is where the component is already hosted.
96106

97-
1. Setup a [GitHub account](http://github.com/), if you haven't yet
98-
2. Fork the repository (http://github.com/zendframework/zend-expressive-zendviewrenderer)
107+
1. Setup a [GitHub account](https://github.com/), if you haven't yet
108+
2. Fork the repository (https://github.com/zendframework/zend-expressive-zendviewrenderer)
99109
3. Clone the canonical repository locally and enter it.
100110

101111
```console
102-
$ git clone git://github.com:zendframework/zend-expressive-zendviewrenderer.git
112+
$ git clone git://github.com/zendframework/zend-expressive-zendviewrenderer.git
103113
$ cd zend-expressive-zendviewrenderer
104114
```
105115

@@ -220,7 +230,6 @@ repository, we suggest doing some cleanup of these branches.
220230
```
221231

222232

223-
224233
## Conduct
225234

226235
Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# zend-view PhpRenderer Integration for Expressive
22

33
[![Build Status](https://secure.travis-ci.org/zendframework/zend-expressive-zendviewrenderer.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-expressive-zendviewrenderer)
4+
[![Coverage Status](https://coveralls.io/repos/zendframework/zend-expressive-zendviewrenderer/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-expressive-zendviewrenderer?branch=master)
45

56
[zend-view PhpRenderer](https://github.com/zendframework/zend-view) integration
67
for [Expressive](https://github.com/zendframework/zend-expressive).

composer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@
4545
"scripts": {
4646
"check": [
4747
"@license-check",
48-
"@cs",
48+
"@cs-check",
4949
"@test"
5050
],
51-
"cs": "phpcs",
52-
"cs-fix": "phpcbf",
51+
"upload-coverage": "coveralls -v",
52+
"cs-check": "phpcs --colors",
53+
"cs-fix": "phpcbf --colors",
5354
"license-check": "docheader check src/ test/",
54-
"test": "phpunit --colors=always"
55+
"test": "phpunit --colors=always",
56+
"test-coverage": "phpunit --coverage-clover clover.xml"
5557
}
5658
}

0 commit comments

Comments
 (0)