Skip to content

Commit

Permalink
Add build files for Travis & Scrutinizer
Browse files Browse the repository at this point in the history
  • Loading branch information
gsomoza committed Sep 17, 2017
1 parent b9f6bbd commit 6fbe21f
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
.gitignore export-ignore

# documentation
_book export-ignore
docs export-ignore

# build chain
bitbucket-pipelines.yml export-ignore
grumphp.yml export-ignore
phpcs.xml export-ignore
phpunit.xml.dist export-ignore
.travis.yml export-ignore
.scrutinizer.yml export-ignore
3 changes: 3 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tools:
external_code_coverage:
timeout: 600 # Timeout in seconds.
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
sudo: false

language: php

php:
- 7.0
- 7.1
- 7.2

matrix:
include:
- php: 7.0
env: deps=low

env:
global:
- deps=no

install:
- if [ "$deps" = "no" ]; then composer $flag install; fi;
- if [ "$deps" = "low" ]; then composer $flag --prefer-lowest --prefer-stable update; fi;

script:
- mkdir -p _build/logs
- ./vendor/bin/phpunit --coverage-clover build/logs/coverage.xml

before_install:
- composer self-update
- composer config --quiet github-oauth.github.com $GITHUB_TOKEN
- if [[ ! $GITHUB_TOKEN ]]; then echo "no github token"; fi
- if [[ ! $GITHUB_TOKEN ]]; then flag=--prefer-source; fi

after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover build/logs/coverage.xml
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2017 Stockbase B.V.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion bootstrap.php → Test/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once __DIR__.'/vendor/autoload.php';
require_once __DIR__.'/../vendor/autoload.php';

if (!function_exists('__')) {

Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
colors="true"
debug="true"
verbose="true"
bootstrap="./bootstrap.php"
bootstrap="./Test/bootstrap.php"
>
<testsuite name="Magento Unit Tests">
<directory suffix="Test.php">Test/Unit</directory>
Expand Down

0 comments on commit 6fbe21f

Please sign in to comment.