Skip to content

Commit

Permalink
build: use GH actions for coverage badge
Browse files Browse the repository at this point in the history
  • Loading branch information
gskema committed Oct 25, 2023
1 parent 735922b commit da015d7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ jobs:
composer test-coverage
composer style
- name: Upload Coverage
if: github.repository_owner == 'gskema'
run: composer upload-coverage
- name: Make code coverage badge
uses: timkrase/[email protected]
with:
report: build/clover.xml
coverage_badge_path: output/coverage.svg
push_badge: false

- name: Git push to image-data branch
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./output
publish_branch: image-data
github_token: ${{ secrets.GITHUB_TOKEN }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
[![Build Status][ico-build]][link-build]
[![Coverage Status][ico-scrutinizer]][link-scrutinizer]
[![Quality Score][ico-code-quality]][link-code-quality]
[![Coverage Status][ico-coverage]][link-build]
[![Total Downloads][ico-downloads]][link-downloads]

Feature complete, object oriented, composable, extendable ElasticSearch query DSL builder for PHP.
Expand Down Expand Up @@ -89,12 +88,9 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio
[ico-version]: https://img.shields.io/packagist/v/gskema/elasticsearch-query-dsl-php.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-build]: https://img.shields.io/github/actions/workflow/status/gskema/elasticsearch-query-dsl-php/ci.yml?branch=6.x
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/gskema/elasticsearch-query-dsl-php.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/gskema/elasticsearch-query-dsl-php.svg?style=flat-square
[ico-coverage]: https://raw.githubusercontent.com/gskema/elasticsearch-query-dsl-php/image-data/badge.svg
[ico-downloads]: https://img.shields.io/packagist/dt/gskema/elasticsearch-query-dsl-php.svg?style=flat-square

[link-packagist]: https://packagist.org/packages/gskema/elasticsearch-query-dsl-php
[link-build]: https://github.com/gskema/elasticsearch-query-dsl-php/actions
[link-scrutinizer]: https://scrutinizer-ci.com/g/gskema/elasticsearch-query-dsl-php/code-structure
[link-code-quality]: https://scrutinizer-ci.com/g/gskema/elasticsearch-query-dsl-php
[link-downloads]: https://packagist.org/packages/gskema/elasticsearch-query-dsl-php
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
},
"require-dev": {
"phpunit/phpunit" : "^10.4",
"squizlabs/php_codesniffer": "^3.7",
"scrutinizer/ocular": "^1.9"
"squizlabs/php_codesniffer": "^3.7"
},
"autoload": {
"psr-4": {
Expand All @@ -39,7 +38,6 @@
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --coverage-clover=clover.xml",
"test-coverage-local": "php -d xdebug.mode=coverage ./vendor/bin/phpunit --coverage-html=build/coverage",
"upload-coverage": "vendor/bin/ocular code-coverage:upload --format=php-clover coverage.xml;",
"style": "@composer prep && ./vendor/bin/phpcs --standard=phpcs.xml -p"
},
"config": {
Expand Down

0 comments on commit da015d7

Please sign in to comment.