Skip to content

Commit

Permalink
Added travis config
Browse files Browse the repository at this point in the history
  • Loading branch information
TomHAnderson committed Jan 19, 2019
1 parent a865ab4 commit 692d5ad
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
sudo: false

language: php

cache:
directories:
- $HOME/.composer/cache

env:
global:
- COMPOSER_ARGS="--no-interaction"

matrix:
fast_finish: true
include:
- php: 7.1
env:
- EXECUTE_CS_CHECK=true
- DEPS=lowest
- php: 7.1
env:
- DEPS=latest
- php: 7.2
- php: 7.3

before_install:
- if [[ $EXECUTE_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- composer self-update
- chmod -R +rwX test/asset/data

install:
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
- travis_retry composer install $COMPOSER_ARGS
- composer show --installed

script:
- mkdir -p build/logs
- if [[ EXECUTE_COVERAGE == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml ; fi
- if [[ EXECUTE_COVERAGE != 'true' ]]; then ./vendor/bin/phpunit ; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs; fi

after_script:
- php vendor/bin/coveralls
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"type": "library",
"require-dev": {
"phpunit/phpunit": "^7.5",
"api-skeletons/coding-standard": "^1.0"
"api-skeletons/coding-standard": "^1.0",
"php-coveralls/php-coveralls": "^2.1"
},
"license": "MIT",
"authors": [
Expand Down

0 comments on commit 692d5ad

Please sign in to comment.