Skip to content

Commit

Permalink
DE-113756 soap sonar integration changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ni3nice authored and ni3nice committed Sep 5, 2024
1 parent b7fecbf commit dcacf15
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,4 @@ jobs:
uses: BrandEmbassy/github-actions/.github/workflows/php-phpunit-with-sonar-qube.yml@master
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

12 changes: 12 additions & 0 deletions .github/workflows/sonar-qube-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Sonar Qube on push to master

on:
push:
branches:
- master

jobs:
phpunit-with-sonar-qube:
uses: BrandEmbassy/github-actions/.github/workflows/php-phpunit-with-sonar-qube.yml@master
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
"doctrine/orm": "Needed for DateTimeImmutableAsTimestampDoctrineType."
},
"require": {
"php": ">=7.4",
"php": ">=8.0",
"brandembassy/datetime-factory": "^1.0",
"nette/utils": "^3.0"
},
"require-dev": {
"brandembassy/coding-standard": "^8.1",
"doctrine/orm": "^2.6",
"phpunit/phpunit": "^8",
"phpunit/phpcov": "^8.2.1",
"phpunit/phpunit": "^9.3",
"roave/security-advisories": "dev-master"
},
"scripts": {
Expand All @@ -26,7 +27,11 @@
"phpstan": "./vendor/bin/phpstan analyse -c phpstan.neon src",
"phpunit": "./vendor/bin/phpunit src --no-coverage",
"phpunit-cc": "./vendor/bin/phpunit src",
"test": "./vendor/bin/phpunit src"
"test": "./vendor/bin/phpunit src",
"post-autoload-dump": [
"XDEBUG_MODE=coverage ./vendor/bin/phpunit src -c phpunit.xml --coverage-php=temp/coverage/unit-tests.cov --log-junit=test-report.xml",
"php -dmemory_limit=8192M vendor/bin/phpcov merge --clover coverage.xml temp/coverage"
]
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
17 changes: 17 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
convertDeprecationsToExceptions="true"
failOnRisky="true"
failOnWarning="true"
verbose="true">

<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
</phpunit>
6 changes: 3 additions & 3 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sonar.projectKey=com.nicedfo.datetime
sonar.projectName=datetime
sonar.language=PHP
sonar.sources=src
sonar.tests=src
sonar.exclusions=**/*Test.php
sonar.test.inclusions=**/*Test.php
sonar.exclusions=vendor/**,temp/**,logs/**,**/*Test.php
sonar.host.url=https://sonar.nice.com
sonar.php.coverage.reportPaths=coverage.xml
sonar.php.tests.reportPath=test-report.xml

0 comments on commit dcacf15

Please sign in to comment.