Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Tests
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
Expand Down Expand Up @@ -51,3 +52,10 @@ jobs:
../vendor/bin/phpunit --coverage-text .
- name: Check code style
run: vendor/bin/phpcs --standard=PEAR src/

- name: SonarQube Scan
if: ${{ matrix.php == '8.1' && github.actor != 'dependabot[bot]' }}
uses: SonarSource/sonarqube-scan-action@v5.2.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ JsonMapper - map nested JSON structures onto PHP classes
:target: https://packagist.org/packages/apimatic/jsonmapper
.. image:: https://github.com/apimatic/jsonmapper/workflows/Tests/badge.svg
:target: https://github.com/apimatic/jsonmapper/actions?query=workflow%3ATests
.. image:: https://sonarcloud.io/api/project_badges/measure?project=apimatic_jsonmapper&metric=sqale_rating
:target: https://sonarcloud.io/summary/new_code?id=apimatic_jsonmapper
.. image:: https://sonarcloud.io/api/project_badges/measure?project=apimatic_jsonmapper&metric=vulnerabilities
:target: https://sonarcloud.io/summary/new_code?id=apimatic_jsonmapper
.. image:: https://img.shields.io/packagist/l/apimatic/jsonmapper.svg?style=flat
:target: https://packagist.org/packages/apimatic/jsonmapper

Expand Down
8 changes: 8 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sonar.projectKey=apimatic_jsonmapper
sonar.projectName=PHP JsonMapper
sonar.organization=apimatic
sonar.host.url=https://sonarcloud.io
sonar.sourceEncoding=UTF-8

sonar.sources=src
sonar.tests=tests