-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unit tests, fixed some bugs (#16)
* Added more unit tests * Removed older php version support * fix composer command * removed trailing spaces * Replaced tabs with spaces * fix move items * Added codecov badge fixes #14 #15
- Loading branch information
Showing
17 changed files
with
3,181 additions
and
1,325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/vendor | ||
error_log | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
language: php | ||
|
||
php: | ||
- 5.5 | ||
- 5.6 | ||
- hhvm | ||
- '7.1' | ||
- '7.2' | ||
- '7.3' | ||
- nightly | ||
|
||
sudo: false | ||
before_script: | ||
- composer install --prefer-dist --no-interaction --no-suggest | ||
|
||
install: travis_retry composer install --no-interaction --prefer-dist | ||
script: | ||
- vendor/bin/phpunit --coverage-clover=coverage.xml | ||
|
||
script: vendor/bin/phpunit --verbose | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG VERSION | ||
FROM php:${VERSION} | ||
RUN curl -O https://getcomposer.org/composer.phar | ||
RUN mv composer.phar /usr/local/bin/composer | ||
RUN chmod a+x /usr/local/bin/composer | ||
RUN apt-get update && apt-get install -y git unzip | ||
ARG VERSION | ||
RUN if [ "$VERSION" = "7.2" ]; then \ | ||
composer global require phpunit/phpunit:^7 && pecl install xdebug-2.7.0alpha1; else \ | ||
composer global require phpunit/phpunit:^4 && pecl install xdebug-2.5.5; fi | ||
RUN docker-php-ext-enable xdebug | ||
ENV PATH="${PATH}:/root/.composer/vendor/bin" | ||
COPY php.ini /usr/local/etc/php/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
RUNNER=docker run -it --rm --workdir "/src" -v "$(PWD):/src" -v "$(HOME)/.composer/cache:/root/.composer/cache" dbcartphp /bin/bash -c | ||
|
||
.PHONY: build composer php test | ||
|
||
build: | ||
@docker build --build-arg VERSION=7.2 --tag=dbcartphp . | ||
composer: | ||
@$(RUNNER) "composer $(filter-out $@,$(MAKECMDGOALS))" | ||
dependencies: | ||
make -s composer update -- --prefer-dist | ||
test: | ||
$(RUNNER) "phpunit --coverage-text --coverage-html ./coverage $(filter-out $@,$(MAKECMDGOALS))" | ||
php: | ||
$(RUNNER) "php $(filter-out $@,$(MAKECMDGOALS))" | ||
%: | ||
@: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.