---
name: default
kind: pipeline
type: docker

steps:
  - name: composer
    image: composer
    volumes:
      - name: composer
        path: /composer
    environment:
      COMPOSER_HOME: /composer
    commands:
      - composer install --no-ansi --no-interaction
      - ./bin/setup

  - name: code styling
    image: d.xr.to/php
    commands:
      - ./vendor/bin/php-cs-fixer fix --dry-run src
    depends_on:
      - composer

  - name: static analysis
    image: d.xr.to/php
    commands:
      - ./vendor/bin/phpstan analyse --no-ansi --no-interaction -l max -a config/autoload_with_route.php src
    depends_on:
      - composer

  - name: testing
    image: d.xr.to/php
    commands:
      - ./vendor/bin/phpunit --colors=always
    depends_on:
      - composer

volumes:
  - name: composer
    host:
      path: /tank/var/composer-cache
---
kind: signature
hmac: cb0fb5d289447319937373a214be5e069ef236ad7f1bac7a18d4d027ec76277d