Skip to content

Commit

Permalink
[CI] Fix PHPUnit job definition & add CodeClimate support (#49)
Browse files Browse the repository at this point in the history
* [CI] Fix PHPUnit job definition
* CodeClimate support
* CodeClimate support only on coverage step
* CodeClimate badges
* Remove download for CodeClimate test reporter
  • Loading branch information
tPl0ch authored Nov 4, 2020
1 parent 4c5a521 commit 1444d43
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
src test
-
name: Run PHPUnit
if: ${{ matrix.php.version != '7.4' && matrix.php.composer != '--prefer-stable' }}
if: ${{ !(matrix.php.version == '7.4' && matrix.php.composer == '--prefer-stable') }}
run: |
docker run -i --rm --net=host --sig-proxy=true --pid=host \
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" -w "${GITHUB_WORKSPACE}" php-avro-serde:${{ matrix.php.version }} \
Expand All @@ -144,14 +144,17 @@ jobs:
if: ${{ matrix.php.version == '7.4' && matrix.php.composer == '--prefer-stable' }}
run: |
mkdir -p build
chmod a+x bin/ocular.phar
docker run -i --rm --net=host --sig-proxy=true --pid=host \
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" -w "${GITHUB_WORKSPACE}" php-avro-serde:${{ matrix.php.version }} \
vendor/bin/phpunit --exclude-group integration --coverage-clover=build/coverage.clover --coverage-text
docker run -i --rm --net=host --sig-proxy=true --pid=host \
-v "${GITHUB_WORKSPACE}":"${GITHUB_WORKSPACE}" -w "${GITHUB_WORKSPACE}" php-avro-serde:${{ matrix.php.version }} \
bin/ocular.phar code-coverage:upload --format=php-clover --repository=g/flix-tech/avro-serde-php \
--revision="${GITHUB_SHA}" build/coverage.clover
- name: Publish code coverage
if: ${{ matrix.php.version == '7.4' && matrix.php.composer == '--prefer-stable' }}
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{secrets.CODE_CLIMATE_REPORTER_ID}}
with:
coverageLocations: |
${{github.workspace}}/build/coverage.clover:clover
confluent-integration:
runs-on: ubuntu-20.04
needs:
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ examples:
install-phars:
curl http://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -o bin/php-cs-fixer.phar -LR -z bin/php-cs-fixer.phar
chmod a+x bin/php-cs-fixer.phar
curl https://scrutinizer-ci.com/ocular.phar -o bin/ocular.phar -LR -z bin/ocular.phar
chmod a+x bin/ocular.phar
curl https://getcomposer.org/download/$(COMPOSER_VERSION)/composer.phar -o bin/composer.phar -LR -z bin/composer.phar
chmod a+x bin/composer.phar
curl https://github.com/phpstan/phpstan/releases/download/$(PHP_STAN_VERSION)/phpstan.phar -o bin/phpstan.phar -LR -z bin/phpstan.phar
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Avro SerDe for PHP 7.3+ and 8.0

[![php-confluent-serde Actions Status](https://github.com/flix-tech/avro-serde-php/workflows/php-confluent-serde/badge.svg?branch=master)](https://github.com/flix-tech/avro-serde-php/actions)
[![Maintainability](https://api.codeclimate.com/v1/badges/7500470a6812cf5a1ad5/maintainability)](https://codeclimate.com/github/flix-tech/avro-serde-php/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/7500470a6812cf5a1ad5/test_coverage)](https://codeclimate.com/github/flix-tech/avro-serde-php/test_coverage)
[![Latest Stable Version](https://poser.pugx.org/flix-tech/avro-serde-php/version)](https://packagist.org/packages/flix-tech/avro-serde-php)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/flix-tech/avro-serde-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/flix-tech/avro-serde-php/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/flix-tech/avro-serde-php/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/flix-tech/avro-serde-php/?branch=master)
[![Total Downloads](https://poser.pugx.org/flix-tech/avro-serde-php/downloads)](https://packagist.org/packages/flix-tech/avro-serde-php)
[![License](https://poser.pugx.org/flix-tech/avro-serde-php/license)](https://packagist.org/packages/flix-tech/avro-serde-php)

Expand Down

0 comments on commit 1444d43

Please sign in to comment.