Skip to content

Commit

Permalink
Merge pull request #10 from microsoft/chore/coverage-reporting
Browse files Browse the repository at this point in the history
Add SonarCloud Coverage reporting.
  • Loading branch information
SilasKenneth authored Feb 8, 2023
2 parents 04d724e + 8c19136 commit 008f4b4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,12 @@ jobs:
- name: Run static analysis
run: ./vendor/bin/phpstan
- name: Run tests
run: ./vendor/bin/phpunit --coverage-text
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Fix code coverage paths
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml
- name: SonarCloud Scan
if: ${{ matrix.php-versions == '8.0' }}
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Build Status](https://travis-ci.org/microsoft/kiota-serialization-json-php.svg?branch=main)](https://travis-ci.org/microsoft/kiota-serialization-json-php)
[![Latest Stable Version](https://poser.pugx.org/microsoft/kiota-serialization-json/version)](https://packagist.org/packages/microsoft/kiota-serialization-json)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=microsoft_kiota-serialization-json-php&metric=coverage)](https://sonarcloud.io/dashboard?id=microsoft_kiota-serialization-json-php)

The Json Serialization Library for PHP is the PHP JSON serialization library implementation.

Expand Down Expand Up @@ -37,8 +38,8 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio

## Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
trademarks or logos is subject to and must follow
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
trademarks or logos is subject to and must follow
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
Any use of third-party trademarks or logos are subject to those third-party's policies.
5 changes: 5 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sonar.projectKey=microsoft_kiota-serialization-json-php
sonar.organization=microsoft
sonar.php.coverage.reportPaths=coverage.xml
sonar.sources=src/
sonar.tests=tests/

0 comments on commit 008f4b4

Please sign in to comment.