image: cedricziel/docker-php-tools:7.0

before_script:
  # install dependencies
  - composer config cache-files-dir .composercache
  - composer install --no-interaction --prefer-dist
  - echo $GCS_PRIVATE_KEY > res/test-key.json

cache:
  paths:
    - .composercache
  key: flysystem_gcs

stages:
  - test

test:
  stage: test
  script:
    - php vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover --colors=never
    - wget https://scrutinizer-ci.com/ocular.phar
    - php ocular.phar code-coverage:upload --repository=g/cedricziel/flysystem-gcs --format=php-clover coverage.clover

image: cedricziel/docker-php-tools:7.0

before_script:
  # install dependencies
  - composer config cache-files-dir .composercache
  - composer install --no-interaction --prefer-dist
  - echo $GCS_PRIVATE_KEY > res/test-key.json

cache:
  paths:
    - .composercache
  key: flysystem_gcs

stages:
  - test

test:5.5:
  image: cedricziel/docker-php-tools:5.5
  stage: test
  script:
    - php vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover --colors=never
    - wget https://scrutinizer-ci.com/ocular.phar
    - php ocular.phar code-coverage:upload --repository=g/cedricziel/flysystem-gcs --format=php-clover coverage.clover

test:5.6:
  image: cedricziel/docker-php-tools:5.6
  stage: test
  script:
    - php vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover --colors=never
    - wget https://scrutinizer-ci.com/ocular.phar
    - php ocular.phar code-coverage:upload --repository=g/cedricziel/flysystem-gcs --format=php-clover coverage.clover

test:7.0:
  stage: test
  script:
    - php vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover --colors=never
    - wget https://scrutinizer-ci.com/ocular.phar
    - php ocular.phar code-coverage:upload --repository=g/cedricziel/flysystem-gcs --format=php-clover coverage.clover

Test multiple php versions on gitlab as well
Test multiple php versions on gitlab as well

Use official php images to speed up build on gitlab ci

Use official php images to speed up build on gitlab ci

Revert to custom docker image
