-
Notifications
You must be signed in to change notification settings - Fork 0
KUNARCHI-177 Configure SonarQube Cloud #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
14d320e
Add sonar config. Bump php version in composer.json
danielsantos-kununu d07e3c9
Merge branch 'main' into KUNARCHI-177
danielsantos-kununu efc8542
Update php version in CI
danielsantos-kununu 41111ba
Support both symfony 6.4 and 7.4 in tests
danielsantos-kununu 8496859
Empty commit
danielsantos-kununu 62dc299
Centralized CI
danielsantos-kununu 9d93f40
Remove steps
danielsantos-kununu a4955b1
Require symfony/console for tests
danielsantos-kununu c9bd799
Set conflict versions in composer.json
danielsantos-kununu dbc3992
Fix friendsofphp/php-cs-fixer minimum version
danielsantos-kununu b3b5009
Change code-owners to kununu/backend-libraries
danielsantos-kununu 3714dac
Update quality badges
danielsantos-kununu 055a943
Remove qodana config
danielsantos-kununu 6db0548
Fix sonar config
danielsantos-kununu 8e1b58a
Add composer dependency analyser
danielsantos-kununu d59bc1a
Add Composer Require Checker and Composer Normalize
danielsantos-kununu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| * @kununu/rosa-mota-backend | ||
| * @kununu/backend-libraries |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| name: Continuous Integration | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| types: [ opened, synchronize, reopened ] | ||
|
|
||
| env: | ||
| fail-fast: true | ||
|
|
||
| jobs: | ||
| checks: | ||
| name: Code Checks | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: 8.4 | ||
| coverage: none | ||
| tools: composer-dependency-analyser, composer-normalize, composer-require-checker | ||
|
|
||
| - name: Install Composer Dependencies | ||
| uses: ramsey/composer-install@v3 | ||
| with: | ||
| dependency-versions: "highest" | ||
| composer-options: "--prefer-stable --optimize-autoloader --no-progress --no-interaction" | ||
|
|
||
| - name: Run Composer Dependency Analyser | ||
| run: composer-dependency-analyser | ||
|
|
||
| - name: Run Composer Require Checker | ||
| run: composer-require-checker | ||
|
|
||
| - name: Run Composer Normalize | ||
| run: composer-normalize --dry-run --indent-size 2 --indent-style space --no-check-lock --no-update-lock | ||
|
|
||
| - name: Run code style sniffer | ||
| run: vendor/bin/phpcs --standard=phpcs.xml Kununu/ tests/ | ||
|
|
||
| - name: Run PHP CS Fixer | ||
| run: vendor/bin/php-cs-fixer check --using-cache=no --config php-cs-fixer.php | ||
|
|
||
| - name: Run PHPStan | ||
| run: vendor/bin/phpstan analyse | ||
|
|
||
| - name: Run Rector | ||
| run: vendor/bin/rector process --ansi --dry-run --config rector.php Kununu/ tests/ | ||
|
|
||
| build: | ||
| needs: checks | ||
| name: PHPUnit | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| dependencies: | ||
| - lowest | ||
| - highest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: 8.4 | ||
| coverage: pcov | ||
|
|
||
| - name: Install Composer Dependencies | ||
| uses: ramsey/composer-install@v3 | ||
| with: | ||
| dependency-versions: ${{ matrix.dependencies }} | ||
| composer-options: "--prefer-stable --optimize-autoloader --no-progress --no-interaction" | ||
|
|
||
| - name: Run PHPUnit | ||
| run: | | ||
| vendor/bin/phpunit --colors=always --testdox \ | ||
| --log-junit tests/.results/tests-junit.xml \ | ||
| --coverage-clover tests/.results/tests-clover.xml | ||
|
|
||
| - name: Upload coverage files | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ github.job }}-8.4-${{ matrix.dependencies }}-coverage | ||
| include-hidden-files: true | ||
| path: tests/.results/ | ||
|
|
||
| sonarcloud: | ||
| needs: build | ||
| name: SonarCloud Checks | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| name: build-8.4-highest-coverage | ||
| path: tests/.results/ | ||
|
|
||
| - name: Fix Code Coverage Paths | ||
| working-directory: tests/.results/ | ||
| run: | | ||
| sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' tests-clover.xml | ||
| sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' tests-junit.xml | ||
|
|
||
| - name: SonarCloud Scan | ||
| uses: SonarSource/sonarqube-scan-action@v7.0.0 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| <?php | ||
| declare(strict_types=1); | ||
|
|
||
| use ShipMonk\ComposerDependencyAnalyser\Config\Configuration; | ||
| use ShipMonk\ComposerDependencyAnalyser\Config\ErrorType; | ||
|
|
||
| $config = new Configuration(); | ||
|
|
||
| return $config | ||
| ->addPathToExclude(__DIR__ . '/tests') | ||
| ->ignoreErrorsOnPath(__DIR__ . '/Kununu/Sniffs/', [ErrorType::UNKNOWN_CLASS]) | ||
| ->ignoreErrorsOnExtensions( | ||
| [ | ||
| 'ext-mbstring', | ||
| 'ext-tokenizer', | ||
| ], | ||
| [ErrorType::SHADOW_DEPENDENCY] | ||
| ) | ||
| ->ignoreErrorsOnPackages( | ||
| [ | ||
| 'friendsofphp/php-cs-fixer', | ||
| 'phpstan/phpstan', | ||
| 'rector/rector', | ||
| 'squizlabs/php_codesniffer', | ||
| ], | ||
| [ErrorType::UNUSED_DEPENDENCY] | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "symbol-whitelist": [ | ||
| "mb_strlen", | ||
| "PHP_CodeSniffer\\Exceptions\\DeepExitException", | ||
| "PHP_CodeSniffer\\Files\\File", | ||
| "PHP_CodeSniffer\\Sniffs\\Sniff", | ||
| "PHP_CodeSniffer\\Standards\\Generic\\Sniffs\\Files\\LineLengthSniff", | ||
| "T_CLASS", | ||
| "T_FUNCTION", | ||
| "T_CLOSE_CURLY_BRACKET", | ||
| "T_COMMA", | ||
| "T_NULLABLE", | ||
| "T_OPEN_TAG", | ||
| "T_PRIVATE", | ||
| "T_PROTECTED", | ||
| "T_PUBLIC", | ||
| "T_READONLY", | ||
| "T_SEMICOLON", | ||
| "T_STRING", | ||
| "T_USE", | ||
| "T_VAR", | ||
| "T_VARIABLE", | ||
| "T_WHITESPACE", | ||
| "T_CONST", | ||
| "T_DECLARE" | ||
| ] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.