Skip to content

Commit

Permalink
Merge pull request #4 from CMProductions/tests
Browse files Browse the repository at this point in the history
Tests
  • Loading branch information
Hilari Moragrega committed Jul 5, 2017
2 parents e5b4fe3 + d383b0c commit c901a29
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 2,265 deletions.
24 changes: 19 additions & 5 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
filter:
paths: ["src/*"]
excluded_paths:
- "bin/"
- "spec/"

checks:
php:
code_rating: true
duplication: true

build:
environment:
php: '5.4.41'
docker: true
tests:
before:
- 'composer install'
override:
- 'make tests'
- 'vendor/phpspec/phpspec/bin/phpspec run'
- 'make dev'
- 'make unit PHP_VERSION=php-7.1'
- 'make unit PHP_VERSION=php-5.6'
- 'make unit PHP_VERSION=php-5.5'
- 'make integration PHP_VERSION=php-7.1'
- 'make integration PHP_VERSION=php-5.6'
- 'make integration PHP_VERSION=php-5.5'
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ APP_ROOT := /app/logging
all: dev nodev

dev:
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml up
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml up -d

nodev:
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml rm -fa > /dev/null
@docker-compose -p ${COMPONENT} -f ops/docker/docker-compose.yml rm -f > /dev/null
ifeq ($(IMAGES),true)
@docker rmi ${COMPONENT}_${CONTAINER}
endif
Expand All @@ -20,10 +20,10 @@ deps:
@composer install --no-interaction

unit:
@${APP_ROOT}/ops/scripts/unit.sh
@docker exec -t ${COMPONENT}_${CONTAINER}_1 ${APP_ROOT}/ops/scripts/unit.sh ${PHP_VERSION}

integration:
@${APP_ROOT}/ops/scripts/integration.sh
@docker exec -t ${COMPONENT}_${CONTAINER}_1 ${APP_ROOT}/ops/scripts/integration.sh ${PHP_VERSION}

ps: status
status:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"psr/log": "^1.0"
},
"require-dev": {
"monolog/monolog": "^1.21",
"monolog/monolog": "^1.23",
"phpspec/phpspec": "^2.5",
"behat/behat": "^3.1",
"phpunit/phpunit": "4.8.*",
Expand Down
Loading

0 comments on commit c901a29

Please sign in to comment.