# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: dockette/php71

pipelines:
  default:
    - step:
        caches:
          - composer
          - vendor-directory
        script:
          - apt-get update && apt-get install -y unzip
          - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
          - composer install
          - cp .env.example .env
          - vendor/bin/phpunit
definitions:
  caches:
    vendor-directory: vendor