language: php
dist: trusty
os: linux
cache:
  directories:
    - $HOME/.composer/cache/files

php:
  - 7.4
  - 7.3.14
  - 7.2
  - 7.1

before_install: 
  - if [ -n "$GITHUB_API_KEY" ]; then composer config -g github-oauth.github.com ${GITHUB_API_KEY}; fi;

install: composer update --prefer-dist --prefer-stable --no-interaction

script: 
  - bin/phpunit --enforce-time-limit --coverage-clover clover.xml
  - bash <(curl -s https://codecov.io/bash) -f clover.xml

jobs:
  include:
    - stage: Test
      name: Prefer lowest
      php: 7.1
      install: composer update --prefer-lowest --prefer-dist --prefer-stable --no-interaction
    - name: Use composer.lock
      php: 7.2
      install: composer install --prefer-dist --no-interaction
    - stage: Code style, static analysis and E2E
      name: End2End with Pcov
      install:
        - pecl install pcov
        - composer update --no-dev --no-interaction
      script:
        - src/Bin/paraunit run FakeDriverTest
        - src/Bin/paraunit coverage FakeDriverTest --text
    - name: End2End with Xdebug
      script: 
        - src/Bin/paraunit run FakeDriverTest
        - src/Bin/paraunit coverage FakeDriverTest --text
    - name: PHPStan
      php: 7.1
      script: composer phpstan
    - name: Check Code Style
      script: composer cs-check 

language: php
dist: trusty
os: linux
cache:
  directories:
    - $HOME/.composer/cache/files

php:
  - 7.4
  - 7.3
  - 7.2
  - 7.1

before_install: 
  - if [ -n "$GITHUB_API_KEY" ]; then composer config -g github-oauth.github.com ${GITHUB_API_KEY}; fi;

install: composer update --prefer-dist --prefer-stable --no-interaction

script: 
  - bin/phpunit --enforce-time-limit --coverage-clover clover.xml
  - bash <(curl -s https://codecov.io/bash) -f clover.xml

jobs:
  include:
    - stage: Test
      name: Prefer lowest
      php: 7.1
      install: composer update --prefer-lowest --prefer-dist --prefer-stable --no-interaction
    - name: Use composer.lock
      php: 7.2
      install: composer install --prefer-dist --no-interaction
    - stage: Code style, static analysis and E2E
      name: End2End with Pcov
      install:
        - pecl install pcov
        - composer update --no-dev --no-interaction
      script:
        - src/Bin/paraunit run FakeDriverTest
        - src/Bin/paraunit coverage FakeDriverTest --text
    - name: End2End with Xdebug
      script: 
        - src/Bin/paraunit run FakeDriverTest
        - src/Bin/paraunit coverage FakeDriverTest --text
    - name: PHPStan
      php: 7.1
      script: composer phpstan
    - name: Check Code Style
      script: composer cs-check 

Stop using a specific PHP 7.3 patch in CI
Stop using a specific PHP 7.3 patch in CI
