Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Commit

Permalink
Use remote SDK repo + Add WordPress / Symfony to Travis CI & Scrutini…
Browse files Browse the repository at this point in the history
…zer (#541)

* Use remote SDK repo + Add WP / Symfony to Travis CI & Scrutinizer

* Scoping NodeJs Proxy package under redirectionio organization

* Fix tests on Travis CI
  • Loading branch information
qboot authored and joelwurtz committed Mar 2, 2018
1 parent c4f3469 commit 8113c52
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
.php_cs.cache
composer.lock
vendor/
coverage/
10 changes: 10 additions & 0 deletions .scrutinizer.yml
@@ -0,0 +1,10 @@
filter:
paths: [src/]

checks:
php:
code_rating: true
duplication: true

tools:
external_code_coverage: true
48 changes: 48 additions & 0 deletions .travis.yml
@@ -0,0 +1,48 @@
language: php

sudo: false

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

php:
- 5.6
- 7.0
- 7.1
- 7.2

branches:
only:
- master

env:
global:
- COMMAND="composer test"

matrix:
fast_finish: true
include:
- php: 5.6
env:
- COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
- COVERAGE=true
- COMMAND="composer code-coverage"
- php: 7.2
env:
- CS_FIX=true
- COMMAND="composer cs-fix"

before_install:
- travis_retry composer self-update
- if [[ "$CS_FIX" = true ]]; then phpenv config-rm xdebug.ini || true; fi

install:
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction

script:
- travis_wait $COMMAND

after_success:
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage/coverage.xml; fi
1 change: 1 addition & 0 deletions README.md
@@ -1,5 +1,6 @@
# RedirectionIO Proxy for Symfony

[![Latest Version](https://img.shields.io/github/release/redirectionio/proxy-symfony.svg)](https://github.com/redirectionio/proxy-symfony)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
[![Build Status](https://img.shields.io/travis/redirectionio/proxy-symfony/master.svg)](https://travis-ci.org/redirectionio/proxy-symfony)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/redirectionio/proxy-symfony.svg)](https://scrutinizer-ci.com/g/redirectionio/proxy-symfony)
Expand Down
4 changes: 2 additions & 2 deletions Tests/EventListener/RequestResponseListenerTest.php
Expand Up @@ -83,8 +83,8 @@ private static function startAgent($port = 3100)
}

// find fake_agent location
$parentFolder = substr(__DIR__, -27, -20);
$fakeAgent = ('symfony' === $parentFolder) ?
$parentFolder = substr(__DIR__, -28, -19);
$fakeAgent = ('/symfony/' === $parentFolder) ?
__DIR__ . '/../../../sdk/src/Resources/fake_agent.php' :
'./vendor/redirectionio/proxy-sdk/src/Resources/fake_agent.php';

Expand Down
19 changes: 8 additions & 11 deletions composer.json
Expand Up @@ -18,30 +18,27 @@
}
],
"require": {
"redirectionio/proxy-sdk": "dev-master"
"redirectionio/proxy-sdk": "^1.0"
},
"require-dev": {
"symfony/http-foundation": "^4.0",
"symfony/http-kernel": "^4.0",
"friendsofphp/php-cs-fixer": "^2.10",
"symfony/http-foundation": "^3.4",
"symfony/http-kernel": "^3.4",
"symfony/phpunit-bridge": "^3.4@beta",
"symfony/process": "^3.3"
},
"autoload": {
"psr-4": {
"RedirectionIO\\Client\\SymfonyBundle\\": ""
"RedirectionIO\\Client\\SymfonyBundle\\": "src/"
}
},
"repositories": [
{
"type": "path",
"url": "../sdk"
}
],
"config": {
"sort-packages": true
},
"scripts": {
"test": "vendor/bin/simple-phpunit"
"test": "vendor/bin/simple-phpunit",
"cs-fix": "vendor/bin/php-cs-fixer fix --config=.php_cs --dry-run --diff",
"code-coverage": "vendor/bin/simple-phpunit --coverage-text --coverage-clover=coverage/coverage.xml --coverage-html=coverage/html"
},
"extra": {
"branch-alias": {
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Expand Up @@ -20,7 +20,7 @@

<filter>
<whitelist>
<directory>./</directory>
<file>./src/EventListener/RequestResponseListener.php</file>
<exclude>
<directory>./Tests</directory>
<directory>./vendor</directory>
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 8113c52

Please sign in to comment.