Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add travis tests #14

Closed
wants to merge 5 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
language: php

sudo: false

git:
depth: 1

cache:
directories:
- $HOME/.composer/cache
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be $HOME/.composer/cache/files to not cache Composer metadata


matrix:
fast_finish: true
include:
- php: nightly
env:
- SYMFONY_VERSION="dev-master"
- CHECK_PHP_SYNTAX="no"
- php: 7.1
env:
- SYMFONY_VERSION="3.2.*"
- CHECK_PHP_SYNTAX="yes"
allow_failures:
- php: nightly

before_install:
- stty cols 120
- INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- echo memory_limit = -1 >> $INI_FILE
- echo session.gc_probability = 0 >> $INI_FILE
- echo opcache.enable_cli = 1 >> $INI_FILE
- rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
- composer self-update
- if [[ "$SYMFONY_VERSION" != "" ]]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;

install:
- if [[ "$CHECK_PHP_SYNTAX" == "yes" ]]; then composer require --dev --no-update friendsofphp/php-cs-fixer; fi;
- composer update --prefer-dist --no-interaction --no-suggest --no-progress --ansi $COMPOSER_FLAGS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you never define $COMPOSER_FLAGS


script:
- vendor/bin/phpunit
- if [[ "$CHECK_PHP_SYNTAX" == "yes" ]]; then php vendor/bin/php-cs-fixer --no-interaction --dry-run --diff -v fix; fi;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You missed a dot after fix.

- if [[ "$CHECK_PHP_SYNTAX" == "yes" ]]; then php vendor/bin/php-cs-fixer --no-interaction --dry-run --diff -v fix .; fi;