Skip to content

Commit d29d1a9

Browse files
committed
Configures CI pipeline.
1 parent 9f328e9 commit d29d1a9

File tree

4 files changed

+715
-2
lines changed

4 files changed

+715
-2
lines changed

.travis.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
language: php
2+
3+
php:
4+
- '7.0'
5+
- '7.1'
6+
7+
# Install packages and create test coverage log directory.
8+
before_script:
9+
- composer install --dev --no-interaction
10+
- mkdir -p build/logs
11+
12+
# Check code formatting, run tests and generate test coverage report.
13+
script:
14+
- vendor/bin/phpcs ./src ./tests --extensions=php --standard=PSR2
15+
- vendor/bin/phpunit -d embedly_api_key=$EMBEDLY_API_KEY --coverage-clover build/logs/clover.xml
16+
17+
# Submit test coverage report to Coveralls.
18+
after_success:
19+
- vendor/bin/coveralls -v
20+
21+
# Cache composer bits for faster test suite runs.
22+
cache:
23+
directories:
24+
- $HOME/.composer/cache
25+
26+
notifications:
27+
email:
28+
on_success: change
29+
on_failure: always

composer.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"scotteh/php-goose": "^0.4"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "^5.7"
20+
"phpunit/phpunit": "^5.7",
21+
"satooshi/php-coveralls": "^1.0",
22+
"squizlabs/php_codesniffer": "^2.8"
2123
},
2224
"autoload": {
2325
"psr-4": {"DayRev\\Extractor\\": "src/"}

0 commit comments

Comments
 (0)