From 96a47ec0ae5a88f752de16226cc950bae2ea760c Mon Sep 17 00:00:00 2001 From: Christian Zosel Date: Thu, 26 Apr 2018 08:41:00 +0200 Subject: [PATCH 1/5] Drop GitHub pages First step to fix #1355 --- .travis.yml | 2 -- .travis_shell_after_success.sh | 39 ---------------------------------- 2 files changed, 41 deletions(-) delete mode 100644 .travis_shell_after_success.sh diff --git a/.travis.yml b/.travis.yml index 281c2630..52fa9580 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,7 +55,5 @@ script: - if [ -z "$COVERAGE" ]; then ./vendor/bin/phpdoc -q -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/*/*" --template="responsive-twig" ; fi after_script: - ## PHPDocumentor - - bash .travis_shell_after_success.sh ## Scrutinizer - if [ -n "$COVERAGE" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml ; fi diff --git a/.travis_shell_after_success.sh b/.travis_shell_after_success.sh deleted file mode 100644 index 06feddaa..00000000 --- a/.travis_shell_after_success.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -echo "--DEBUG--" -echo "TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG" -echo "TRAVIS_PHP_VERSION: $TRAVIS_PHP_VERSION" -echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST" - -if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPWord" ] && [ "$TRAVIS_BRANCH" != "develop" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then - - echo -e "Publishing PHPDoc...\n" - - cp -R build/docs $HOME/docs-latest - cp -R build/coverage $HOME/coverage-latest - - cd $HOME - git config --global user.email "travis@travis-ci.org" - git config --global user.name "travis-ci" - git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/PHPOffice/PHPWord gh-pages > /dev/null - - cd gh-pages - echo "--DEBUG : Suppression" - git rm -rf ./docs/$TRAVIS_BRANCH - - echo "--DEBUG : Dossier" - mkdir -p docs/$TRAVIS_BRANCH - mkdir -p coverage/$TRAVIS_BRANCH - - echo "--DEBUG : Copie" - cp -Rf $HOME/docs-latest/* ./docs/$TRAVIS_BRANCH/ - cp -Rf $HOME/coverage-latest/* ./coverage/$TRAVIS_BRANCH/ - - echo "--DEBUG : Git" - git add -f . - git commit -m "PHPDocumentor (Travis Build: $TRAVIS_BUILD_NUMBER - Branch: $TRAVIS_BRANCH)" - git push -fq origin gh-pages > /dev/null - - echo -e "Published PHPDoc to gh-pages.\n" - -fi From e47ce1b4fc493ecfa7d5b5cd60c425d54cd78a3b Mon Sep 17 00:00:00 2001 From: Christian Zosel Date: Sat, 19 May 2018 12:39:30 +0200 Subject: [PATCH 2/5] Coveralls integration --- .travis.yml | 6 +++--- composer.json | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 52fa9580..d79a7dce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,6 +54,6 @@ script: ## PHPDocumentor - if [ -z "$COVERAGE" ]; then ./vendor/bin/phpdoc -q -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/*/*" --template="responsive-twig" ; fi -after_script: - ## Scrutinizer - - if [ -n "$COVERAGE" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml ; fi +after_success: + ## Coveralls + - if [ -z "$COVERAGE" ]; then travis_retry php vendor/bin/php-coveralls -v ; fi diff --git a/composer.json b/composer.json index 742e4bc8..e4d5927e 100644 --- a/composer.json +++ b/composer.json @@ -61,7 +61,8 @@ "php": "^5.3.3 || ^7.0", "ext-xml": "*", "zendframework/zend-escaper": "^2.2", - "phpoffice/common": "^0.2" + "phpoffice/common": "^0.2", + "php-coveralls/php-coveralls": "1.1.0" }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^5.0", From 2480103b49c937da2c36a3573e5ab61f9469d8e6 Mon Sep 17 00:00:00 2001 From: troosan Date: Sun, 20 May 2018 17:13:04 +0200 Subject: [PATCH 3/5] run coveralls when running build with code coverage --- .travis.yml | 2 +- composer.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index d79a7dce..bd85b2d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,4 +56,4 @@ script: after_success: ## Coveralls - - if [ -z "$COVERAGE" ]; then travis_retry php vendor/bin/php-coveralls -v ; fi + - if [ -n "$COVERAGE" ]; then travis_retry php vendor/bin/php-coveralls -v ; fi diff --git a/composer.json b/composer.json index e4d5927e..c29e901a 100644 --- a/composer.json +++ b/composer.json @@ -61,8 +61,7 @@ "php": "^5.3.3 || ^7.0", "ext-xml": "*", "zendframework/zend-escaper": "^2.2", - "phpoffice/common": "^0.2", - "php-coveralls/php-coveralls": "1.1.0" + "phpoffice/common": "^0.2" }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^5.0", @@ -73,7 +72,8 @@ "phploc/phploc": "2.* || 3.* || 4.*", "dompdf/dompdf":"0.8.*", "tecnickcom/tcpdf": "6.*", - "mpdf/mpdf": "5.* || 6.* || 7.*" + "mpdf/mpdf": "5.* || 6.* || 7.*", + "php-coveralls/php-coveralls": "1.1.0 || ^2.0" }, "suggest": { "ext-zip": "Allows writing OOXML and ODF", From 254064150d1515768ab576085ff0feda5f00d9c7 Mon Sep 17 00:00:00 2001 From: troosan Date: Sun, 20 May 2018 20:59:34 +0200 Subject: [PATCH 4/5] disable external code coverage --- .scrutinizer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 291a6d60..2b395afd 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -19,7 +19,7 @@ tools: config: ruleset: phpmd.xml.dist external_code_coverage: - enabled: true + enabled: false timeout: 1200 php_cpd: true # php_sim: # Temporarily disabled to allow focus on things other than duplicates From 0b27bb927dc1af20510b0aa55e54ae74f1060692 Mon Sep 17 00:00:00 2001 From: troosan Date: Sun, 20 May 2018 22:08:53 +0200 Subject: [PATCH 5/5] update changelog [ci skip] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b5d7767..69f0c811 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,8 @@ v0.15.0 (?? ??? 2018) - Remove zend-stdlib dependency @Trainmaster #1284 - The default unit for `\PhpOffice\PhpWord\Style\Image` changed from `px` to `pt`. +### Miscelaneous +- Drop GitHub pages, switch to coveralls for code coverage analysis @czosel #1360 v0.14.0 (29 Dec 2017) ----------------------