From 04188816c68b61248c138ea10c435ce39d0dd3bc Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 1 May 2017 16:44:51 +1200 Subject: [PATCH] Add Codecov integration and Codecov/Scrutinizer badges to readme --- .travis.yml | 21 ++++++++++++++------- README.md | 13 ++++++++----- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3db9042..4e23565 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -# See https://github.com/silverstripe-labs/silverstripe-travis-support for setup details +# See https://github.com/silverstripe/silverstripe-travis-support for setup details sudo: false @@ -15,8 +15,8 @@ env: matrix: include: - - php: 5.6 - env: DB=MYSQL CORE_RELEASE=3 + - php: 7.1 + env: DB=MYSQL CORE_RELEASE=3 COVERAGE="--coverage-clover=coverage.xml" - php: 5.6 env: DB=MYSQL CORE_RELEASE=3.1 - php: 5.6 @@ -28,10 +28,17 @@ matrix: before_script: - composer self-update || true - - git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support - - php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss - - cd ~/builds/ss + - git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support + - php ~/travis-support/travis_setup.php --source `pwd` --target ~/build/ss + - cd ~/build/ss - composer install script: - - vendor/bin/phpunit dms/tests + - vendor/bin/phpunit "$COVERAGE" dms/tests + +after_success: + - > + test "$COVERAGE" != "" + && mv coverage.xml ~/build/$TRAVIS_REPO_SLUG + && cd ~/build/$TRAVIS_REPO_SLUG + && bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index 1847344..aa82a91 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # Document Management Module (DMS) -[![Build Status](https://travis-ci.org/silverstripe/silverstripe-dms.png?branch=master)](https://travis-ci.org/silverstripe/silverstripe-dms) +[![Build status](https://travis-ci.org/silverstripe/silverstripe-dms.png?branch=master)](https://travis-ci.org/silverstripe/silverstripe-dms) +[![Code quality](https://scrutinizer-ci.com/g/silverstripe/silverstripe-dms/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-dms/?branch=master) +[![Code coverage](https://codecov.io/gh/silverstripe/silverstripe-dms/branch/master/graph/badge.svg)](https://codecov.io/gh/silverstripe/silverstripe-dms) + ## Overview @@ -33,7 +36,7 @@ the default implementation (the `DMS` class) stores them locally. Relations to pages and tags are persisted as many-many relationships through the SilverStripe ORM. -File locations in this implementation are structured into +File locations in this implementation are structured into subfolders, in order to avoid exceeding filesystem limits. The file name is a composite based on its database ID and the original file name. The exact location shouldn't @@ -93,7 +96,7 @@ Note: Both operations copy the existing file. // Set default download behavior ('open' or 'download'). 'download' is the system default // Attempt to open the file in the browser Config::inst()->update('DMSDocument', 'default_download_behaviour', 'open'); - + Or in you config.yml: DMSDocument: @@ -123,8 +126,8 @@ Or in you config.yml: $doc->addTag('category', 'input device'); // Removing tags is abstracted as well - $doc->removeTag('category', 'keyboard'); - $doc->removeTag('category', 'input device'); + $doc->removeTag('category', 'keyboard'); + $doc->removeTag('category', 'input device'); $doc->removeAllTags(); ## Contributing