From e9ff660de9e47709a32cc5d2709274be865657fc Mon Sep 17 00:00:00 2001 From: jacobemerick Date: Tue, 22 Nov 2016 05:06:21 -0700 Subject: [PATCH] CI misc --- .codeclimate.yml | 18 ++++++++++++++++++ .travis.yml | 14 ++++++++++++++ bin/codeclimate.sh | 4 ++++ phpunit.xml | 15 +++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 .codeclimate.yml create mode 100644 .travis.yml create mode 100644 bin/codeclimate.sh create mode 100644 phpunit.xml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..130915b --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,18 @@ +--- +engines: + duplication: + enabled: true + config: + languages: + - php + fixme: + enabled: true + phpcodesniffer: + enabled: true + phpmd: + enabled: true +ratings: + paths: + - "**.php" +exclude_paths: +- tests/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..3e2203d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: php + +php: + - 5.6 + - 7 + +install: + - composer install --dev --no-interaction + +script: + - phpunit --tap --coverage-clover build/logs/clover.xml + +after_script: + - bash bin/codeclimate.sh diff --git a/bin/codeclimate.sh b/bin/codeclimate.sh new file mode 100644 index 0000000..47d1c2e --- /dev/null +++ b/bin/codeclimate.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +php vendor/bin/test-reporter --stdout > codeclimate.json +curl -X POST -d @codeclimate.json -H 'Content-Type: application/json' -H 'User-Agent: Code Climate (PHP Test Reporter v0.1.1)' https://codeclimate.com/test_reports diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..e3f9274 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,15 @@ + + + + tests/unit + + + + + + + + ./src/ + + +