summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: c64c0856ec6cb185624646d72bcbd5b23707d2d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
language: php

matrix:
  include:
    - php: 7.4
      dist: focal
    - php: 8.0
      dist: focal

## Non-sudo environments are faster
sudo: false

## Cache composer and vendor libraries
cache:
  directories:
    - vendor
    - $HOME/.composer/cache

before_script:
  - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then composer config github-oauth.github.com "${GITHUB_OAUTH_TOKEN}"; fi
  - travis_retry composer install

# Coverage testing is slow, so only do it once.
script:
  - if [ $TRAVIS_PHP_VERSION  = 7.4 ]; then XDEBUG_MODE=coverage vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover tests/clover.xml; fi
  - if [ $TRAVIS_PHP_VERSION != 7.4 ]; then vendor/bin/phpunit -c phpunit.xml.dist; fi

after_script:
  - if [ $TRAVIS_PHP_VERSION = 7.4 ]; then travis_retry php vendor/bin/php-coveralls -v; fi