Skip to content
Permalink
Browse files

Set up SonarCloud

  • Loading branch information
jeromegamez committed Mar 15, 2019
1 parent a175d28 commit f230e94740598bd855dcf14f932a13633327601b
Showing with 26 additions and 12 deletions.
  1. +1 −0 .gitattributes
  2. +11 −7 .travis.yml
  3. +5 −0 README.md
  4. +0 −5 composer.json
  5. +9 −0 sonar-project.properties
@@ -9,3 +9,4 @@
/phive.xml export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
/sonar-project.properties export-ignore
@@ -5,17 +5,21 @@ php:
- 7.1
- 7.2
- 7.3
- nightly

matrix:
fast_finish: true
allow_failures:
- php: nightly

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

addons:
sonarcloud:
organization: "jeromegamez-github"

git:
depth: false

install: composer update --no-interaction --no-suggest --no-progress

script: composer test-ci
script:
- vendor/bin/phpstan analyze -c phpstan.neon.dist --no-interaction --no-progress
- vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover=coverage-report.clover --log-junit=test-report.xml
- sonar-scanner
@@ -4,7 +4,12 @@ Working with durations made easy.

[![Current version](https://img.shields.io/packagist/v/gamez/duration.svg)](https://packagist.org/packages/gamez/duration)
[![Supported PHP version](https://img.shields.io/packagist/php-v/gamez/duration.svg)]()

[![Build Status](https://travis-ci.com/jeromegamez/duration-php.svg?branch=master)](https://travis-ci.com/jeromegamez/duration-php)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=jeromegamez_duration-php&metric=alert_status)](https://sonarcloud.io/dashboard?id=jeromegamez_duration-php)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=jeromegamez_duration-php&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=jeromegamez_duration-php)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=jeromegamez_duration-php&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=jeromegamez_duration-php)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=jeromegamez_duration-php&metric=coverage)](https://sonarcloud.io/dashboard?id=jeromegamez_duration-php)

Do you like to use `DateInterval` to compute and work with durations? Me neither, so let's fix that!

@@ -29,13 +29,8 @@
},
"scripts": {
"test": ["@phpunit", "@phpstan"],
"test-ci": ["@phpunit-ci", "@phpstan-ci"],

"coverage": "vendor/bin/phpunit --coverage-html=build/coverage",

"phpunit": "vendor/bin/phpunit --testdox",
"phpunit-ci": "vendor/bin/phpunit -c phpunit.xml.dist --testdox",

"phpstan": "vendor/bin/phpstan analyze",
"phpstan-ci": "vendor/bin/phpstan analyze -c phpstan.neon.dist --no-interaction --no-progress"
},
@@ -0,0 +1,9 @@
sonar.projectKey=jeromegamez_duration-php
sonar.projectName=Durations for PHP

sonar.sources=src
sonar.tests=tests
sonar.language=php
sonar.sourceEncoding=UTF-8
sonar.php.coverage.reportPaths=coverage-report.clover
sonar.php.tests.reportPath=test-report.xml

0 comments on commit f230e94

Please sign in to comment.
You can’t perform that action at this time.