image: php:7.4
pipelines:
  default:
    - step:
        name: Unit Tests
        caches:
          - composer
        script:
          - apt-get update && apt-get install -y git zip unzip
          - curl -sSL https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - | sh -s \
            bcmath mysqli zip
          - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
          - composer install
          - ./vendor/bin/phpunit --no-configuration --test-suffix _tests.php --process-isolation ./hays/tests --log-junit ./test-reports/junit.xml

