language: php
sudo: false
php:
  - 7.1
before_script:
  - ./ci/backend.sh
script:
  - vendor/phpunit/phpunit/phpunit -c app --coverage-clover=coverage.xml
  - ./ci/frontend.sh
after_success:
  - bash <(curl -s https://codecov.io/bash)
env:
  global:
    - secure: "ELFgvd3Wm426wLb0jrQvHIQ9yqZsqvk7quQvMIWR7QcAf9IGsUwxlQHIT99Ol+czx+4oP4OMw+39obS9zBf4RmzOi1seqHrkix1bRjKtEgnYDZUum87V5AXRd1/4wv8o2+7TUli3fIF2bEK6CGhd7bs/Lt6TRD1GL6zVBnd6Wh4=" #target
cache:
  directories:
    - vendor
    - src/Dime/FrontendBundle/Resources/public/packages
    - dart-sdk
deploy:
  - provider: script
    script: ci/deploy.sh test
    skip_cleanup: true
    on:
      branch: master
  - provider: script
    script: ci/deploy.sh prod
    skip_cleanup: true
    on:
      branch: production

language: php
sudo: false
php:
  - 7.1
before_script:
  - ./ci/backend.sh
script:
  - vendor/phpunit/phpunit/phpunit -c app --coverage-clover=coverage.xml
  - ./ci/frontend.sh
after_success:
  - bash <(curl -s https://codecov.io/bash)
env:
  global:
    - secure: "ELFgvd3Wm426wLb0jrQvHIQ9yqZsqvk7quQvMIWR7QcAf9IGsUwxlQHIT99Ol+czx+4oP4OMw+39obS9zBf4RmzOi1seqHrkix1bRjKtEgnYDZUum87V5AXRd1/4wv8o2+7TUli3fIF2bEK6CGhd7bs/Lt6TRD1GL6zVBnd6Wh4=" #target
cache:
  directories:
    - vendor
    - src/Dime/FrontendBundle/Resources/public/packages
    - dart-sdk
deploy:
  - provider: script
    script: ci/deploy.sh test
    skip_cleanup: true
    on:
      branch: master
  - provider: script
    script: ci/deploy.sh test
    skip_cleanup: true
    on:
      branch: dev
  - provider: script
    script: ci/deploy.sh prod
    skip_cleanup: true
    on:
      branch: production

Deploy 'dev' branch on production as well
Deploy 'dev' branch on production as well
