Skip to content

Commit

Permalink
Update Travis, Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
olvlvl committed Mar 17, 2018
1 parent 0181ad4 commit 3831e6f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
10 changes: 3 additions & 7 deletions .travis.yml
Expand Up @@ -4,6 +4,7 @@ cache:
directories:
- $COMPOSER_CACHE_DIR
- $HOME/.composer/cache
- $TRAVIS_BUILD_DIR/build

language: php

Expand All @@ -13,12 +14,7 @@ php:
- 7.1

before_script:
- if [[ $TRAVIS_PHP_VERSION != "5.6" ]]; then COMPOSER_ROOT_VERSION=4.0 composer install; fi
- if [[ $TRAVIS_PHP_VERSION = "5.6" ]]; then COMPOSER_ROOT_VERSION=4.0 composer require satooshi/php-coveralls; fi
- if [[ $TRAVIS_PHP_VERSION != "5.6" ]]; then phpenv config-rm xdebug.ini; fi

script:
- if [[ $TRAVIS_PHP_VERSION != "5.6" ]]; then vendor/bin/phpunit; fi
- if [[ $TRAVIS_PHP_VERSION = "5.6" ]]; then vendor/bin/phpunit --coverage-clover ../clover.xml; fi

after_success:
- if [[ "$TRAVIS_PHP_VERSION" = "5.6" ]]; then php vendor/bin/coveralls -v -x clover.xml; fi
- if [[ $TRAVIS_PHP_VERSION == "5.6" ]]; then make test-coveralls; else make test; fi
4 changes: 2 additions & 2 deletions LICENSE
@@ -1,7 +1,7 @@
The icanboogie/bind-routing package is free software.
icanboogie/bind-routing is free software.
It is released under the terms of the following BSD License.

Copyright (c) 2015-2016 by Olivier Laviale
Copyright (c) 2015-2018 by Olivier Laviale
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
22 changes: 19 additions & 3 deletions Makefile
Expand Up @@ -2,10 +2,14 @@

PACKAGE_NAME = icanboogie/bind-routing
PACKAGE_VERSION = 4.0
PHPUNIT = vendor/bin/phpunit
PHPUNIT_VERSION = phpunit-5.phar
PHPUNIT_FILENAME = build/$(PHPUNIT_VERSION)
PHPUNIT = php $(PHPUNIT_FILENAME)

# do not edit the following lines

all: $(PHPUNIT_FILENAME) vendor

usage:
@echo "test: Runs the test suite.\ndoc: Creates the documentation.\nclean: Removes the documentation, the dependencies and the Composer files."

Expand All @@ -18,13 +22,23 @@ update:
autoload: vendor
@composer dump-autoload

test: vendor
$(PHPUNIT_FILENAME):
mkdir -p build
wget https://phar.phpunit.de/$(PHPUNIT_VERSION) -O $(PHPUNIT_FILENAME)

test: all
@$(PHPUNIT)

test-coverage: vendor
test-coverage: all
@mkdir -p build/coverage
@$(PHPUNIT) --coverage-html ../build/coverage

test-coveralls: all
@mkdir -p build/logs
COMPOSER_ROOT_VERSION=$(PACKAGE_VERSION) composer require satooshi/php-coveralls
@$(PHPUNIT) --coverage-clover ../build/logs/clover.xml
php vendor/bin/php-coveralls -v

doc: vendor
@mkdir -p build/docs
@apigen generate \
Expand All @@ -37,3 +51,5 @@ clean:
@rm -fR build
@rm -fR vendor
@rm -f composer.lock

.PHONY: all autoload doc clean test test-coverage test-coveralls update
3 changes: 0 additions & 3 deletions composer.json
Expand Up @@ -29,9 +29,6 @@
"icanboogie/bind-http": "^3.0",
"icanboogie/routing": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7"
},
"autoload": {
"psr-4": {
"ICanBoogie\\Binding\\Routing\\": "lib/"
Expand Down

0 comments on commit 3831e6f

Please sign in to comment.