Skip to content

Commit e82e9d0

Browse files
docs: add coveralls support and add README badges
1 parent b2ad12b commit e82e9d0

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.github/workflows/phpunit.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,11 @@ jobs:
3636
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
3737

3838
- name: Execute tests
39-
run: vendor/bin/phpunit -v --coverage-text
39+
run: vendor/bin/phpunit -v --coverage-text --coverage-clover build/logs/clover.xml
40+
41+
- name: Upload coverage results to Coveralls
42+
env:
43+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
run: |
45+
composer global require php-coveralls/php-coveralls
46+
php-coveralls --coverage_clover=build/logs/clover.xml -v

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Abstract server side php implementation of the JSON:API protocol.
22

3+
[![phpunit](https://github.com/dogado-group/json-api-server/actions/workflows/phpunit.yml/badge.svg)](https://github.com/dogado-group/json-api-server/actions/workflows/phpunit.yml)
4+
[![Coverage Status](https://coveralls.io/repos/github/dogado-group/json-api-server/badge.svg?branch=main)](https://coveralls.io/github/dogado-group/json-api-server?branch=main)
5+
[![Total Downloads](https://poser.pugx.org/dogado/json-api-server/downloads)](https://packagist.org/packages/dogado/json-api-server)
6+
[![Latest Stable Version](https://poser.pugx.org/dogado/json-api-server/v/stable)](https://packagist.org/packages/dogado/json-api-server)
7+
[![Latest Unstable Version](https://poser.pugx.org/dogado/json-api-server/v/unstable.png)](https://packagist.org/packages/dogado/json-api-server)
8+
[![License](https://poser.pugx.org/dogado/json-api-server/license)](https://packagist.org/packages/dogado/json-api-server)
9+
310
## Installation
411

512
```sh

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"doctrine/cache": "^1.10"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "^9.0",
20+
"phpunit/phpunit": "^9.5",
2121
"fakerphp/faker": "^1.10",
2222
"phpstan/phpstan": "^0.12.49",
2323
"guzzlehttp/psr7": "^1.7",

0 commit comments

Comments
 (0)