Use travis

This commit is contained in:
Oliver Davies 2018-03-20 20:29:21 +00:00
parent 7adc3bd18d
commit 5eedcbb99e
4 changed files with 26 additions and 26 deletions

View file

@ -1,26 +0,0 @@
# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
jobs:
build:
docker:
- image: circleci/php:7.1-browsers
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "composer.json" }}
- v1-dependencies-
- run: composer install -n --prefer-dist
- save_cache:
paths:
- ./vendor
key: v1-dependencies-{{ checksum "composer.json" }}
- run: ./vendor/bin/phpunit --log-junit ~/phpunit/junit.xml
- store_test_results:
path: ~/phpunit
- store_artifacts:
path: ~/phpunit

11
.php_cs.dist Normal file
View file

@ -0,0 +1,11 @@
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__);
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => true,
'phpdoc_order' => true,
])
->setFinder($finder);

14
.travis.yml Normal file
View file

@ -0,0 +1,14 @@
language: php
php:
- 5.6
- 7.0
- 7.1
- 7.2
before_script:
- composer install --dev --prefer-source --no-interaction
script:
- vendor/bin/php-cs-fixer fix --dry-run
- vendor/bin/phpunit

View file

@ -18,6 +18,7 @@
"tightenco/collect": "^5.4"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.11",
"phpunit/phpunit": "^5.7",
"symfony/var-dumper": "^3.4"
},