From 2499dc46b7899de0476b435e006b506fb077e517 Mon Sep 17 00:00:00 2001 From: Adrien Loison Date: Wed, 12 Jan 2022 23:51:52 +0100 Subject: [PATCH] Integrate Coveralls --- .github/workflows/ci.yml | 11 ++++++-- .scrutinizer.yml | 57 ---------------------------------------- README.md | 3 +-- 3 files changed, 10 insertions(+), 61 deletions(-) delete mode 100644 .scrutinizer.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64a4687..6d46b92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -157,9 +157,16 @@ jobs: run: composer install --no-progress --prefer-dist --optimize-autoloader - name: Run Tests with Code Coverage - run: vendor/bin/phpunit --coverage-clover=coverage.clover + run: | + mkdir -p build/logs + vendor/bin/phpunit --coverage-clover=build/logs/clover.xml - # TODO: Send coverage data to a new provider + - name: Upload coverage results to Coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + composer global require php-coveralls/php-coveralls + php-coveralls --coverage_clover=build/logs/clover.xml -v --exclude-no-stmt coding-style: name: Coding Style diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index 6cc009e..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,57 +0,0 @@ -filter: - excluded_paths: [vendor/*, tests/*] - -tools: - external_code_coverage: - timeout: 600 # Wait 10 minutes for results - runs: 1 # Merge results for the 7.1 job - php_mess_detector: true - php_code_sniffer: - config: - standard: PSR4 - filter: - paths: ['src'] - sensiolabs_security_checker: true - php_pdepend: true - php_loc: - enabled: true - filter: - paths: ['src'] - php_cpd: false # Must be disabled to use php_sim instead - php_sim: - enabled: true - filter: - paths: ['src'] - -build_failure_conditions: - - 'project.metric("scrutinizer.quality", < 9)' # Code Quality Rating drops below 9 - - 'project.metric_change("scrutinizer.test_coverage", < -0.005)' # Code Coverage decreased by more than 0.5% - - 'project.metric("scrutinizer.test_coverage", < 0.97)' # Code Coverage drops below 97% - -checks: - php: - remove_extra_empty_lines: true - remove_php_closing_tag: true - remove_trailing_whitespace: true - fix_use_statements: - remove_unused: true - preserve_multiple: false - preserve_blanklines: true - fix_php_opening_tag: true - fix_linefeed: true - fix_line_ending: true - fix_identation_4spaces: true - fix_doc_comments: true - uppercase_constants: true - use_self_instead_of_fqcn: true - simplify_boolean_return: true - return_doc_comments: true - return_doc_comment_if_not_inferrable: true - phpunit_assertions: true - parameters_in_camelcaps: true - parameter_doc_comments: true - param_doc_comment_if_not_inferrable: true - optional_parameters_at_the_end: true - newline_at_end_of_file: true - encourage_single_quotes: true - diff --git a/README.md b/README.md index 7c77242..47ec9e8 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,7 @@ [![Latest Stable Version](https://poser.pugx.org/box/spout/v/stable)](https://packagist.org/packages/box/spout) [![Project Status](https://opensource.box.com/badges/active.svg)](https://opensource.box.com/badges) [![Build Status](https://travis-ci.org/box/spout.svg?branch=master)](https://travis-ci.org/box/spout) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/box/spout/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/box/spout/?branch=master) -[![Code Coverage](https://scrutinizer-ci.com/g/box/spout/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/box/spout/?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/box/spout/badge.svg?branch=master)](https://coveralls.io/github/box/spout?branch=master) [![Total Downloads](https://poser.pugx.org/box/spout/downloads)](https://packagist.org/packages/box/spout) Spout is a PHP library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way.