Merge pull request #103 from robbieaverill/feature/scrutinizer-and-codecov

Add Codecov integration and Codecov/Scrutinizer badges to readme
This commit is contained in:
Franco Springveldt 2017-05-02 09:26:31 +12:00 committed by GitHub
commit 1d2defe0cc
2 changed files with 22 additions and 12 deletions

View File

@ -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)

View File

@ -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