language: php
os: linux
dist: xenial 
php:
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
script:
# Composer is testing-only; vendor folder should not appear in releases
- if [[ $TRAVIS_PHP_VERSION == 'nightly' ]]; then composer --no-interaction config platform.php 7.4.0; fi
- composer install
- XDEBUG_MODE=coverage ./vendor/bin/phpunit --verbose --stderr --coverage-clover=coverage.xml
after_success:
- bash <(curl -s https://codecov.io/bash)
jobs:
  fast_finish: true
  allow_failures:
    - php: "8.0"
  include:
  - stage: GitHub Release
    php: '7.4'
    before_install:
    - echo 'DOCKER_OPTS="$DOCKER_OPTS --debug --registry-mirror=https://mirror.gcr.io"'
    - sudo service docker restart
    - docker system info
    services:
    - docker
    script:
    - docker run --rm -it -v $PWD:/app centos:centos8 /app/utils/build.sh
    deploy:
      provider: releases
      file_glob: true
      file: utils/dist/CAS-*.tgz
      skip_cleanup: true
      token:
        secure: IQPP9ytdAxMQpXdfHsbnWaly7BiORVeCCfgKBPtQqtuakTBkNltPMmPHIhH2ihnQ0/fOUL4DpbiQdCIEVVIQgerdWK+WjMhGmyRyt8froqT1GOJfcKXMBxxaLWpQS53R/jWt4cWs9DNgkFXtbe5MlV/czaoFsMQowoEV+fnwYKg=
      on:
        repo: apereo/phpCAS
        tags: true
notifications:
  email: false
