Checkout Config
build:
environment:
variables:
ENV: 'ci'
mysql: false
postgresql: false
redis: false
rabbitmq: false
php:
version: 7.1
ini:
'date.timezone': 'Europe/Amsterdam'
docker:
remote_engine: true
cache:
images:
- 'php:7.1-alpine'
- 'hgraca/explicit-architecture:app.sfn.base'
dependencies:
override:
- true # so scrutinizer does't install the dependencies, which we don't need because they are inside the container
tests:
override:
-
command: make test-ci
coverage:
file: var/coverage.clover.xml
format: php-clover
-
command: bash <(curl -s https://codecov.io/bash)
# Used for deployment.
# Will only be executed if all tests succeeded.
# If run in parallel, will be executed in the container where tests finish last.
deployment:
-
branch: '/^acc-/'
commands:
- heroku container:login
- APP_NAME=$(git rev-parse --abbrev-ref HEAD) && echo $APP_NAME
- heroku create ${APP_NAME}
- docker login --username=_ --password=${HEROKU_TOKEN} registry.heroku.com
- docker tag hgraca/explicit-architecture:${APP_NAME} registry.heroku.com/${APP_NAME}/web
- docker push registry.heroku.com/${APP_NAME}/web
-
branch: master
commands:
- docker login --username=_ --password=${HEROKU_TOKEN} registry.heroku.com
- docker tag hgraca/explicit-architecture:app.sfn.prd registry.heroku.com/explicit-arch-sfn-prd/web
- docker push registry.heroku.com/explicit-arch-sfn-prd/web
filter:
paths:
- "src/"
dependency_paths:
- "vendor/"
build_failure_conditions:
- 'issues.new.exists'
- 'project.metric_change("scrutinizer.test_coverage", < -0.05)'
checks:
php:
code_rating: true
duplication: true
Repository Config
build:
environment:
variables:
CODECOV_TOKEN: 'b7b7874a-1fcc-42c7-8d5d-91fe6d4e7d26'
HEROKU_TOKEN: 'a954b851-8f7b-4187-b6eb-ea009435a7d5'
heroku:
api_key: 'a954b851-8f7b-4187-b6eb-ea009435a7d5'
email: '[email protected]'