From 8cfb49c07b39859751dc7551a7f6ba9b759a7f0b Mon Sep 17 00:00:00 2001 From: Yoanm <4410697+yoanm@users.noreply.github.com> Date: Tue, 2 Sep 2025 20:42:41 +0200 Subject: [PATCH 1/2] Harmonize CI --- .github/workflows/coverage-upload.yml | 2 +- .github/workflows/pre-check-CI-updates.yml | 2 +- .github/workflows/reusable-CI-workflow.yml | 4 ++-- .github/workflows/reusable-coverage-upload-workflow.yml | 4 +++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coverage-upload.yml b/.github/workflows/coverage-upload.yml index 7953f5d..0d66a5d 100644 --- a/.github/workflows/coverage-upload.yml +++ b/.github/workflows/coverage-upload.yml @@ -9,7 +9,7 @@ permissions: checks: write # For the check run creation ! jobs: - upload: + coverage: name: Coverage permissions: contents: read diff --git a/.github/workflows/pre-check-CI-updates.yml b/.github/workflows/pre-check-CI-updates.yml index 4dde12e..1a9abcc 100644 --- a/.github/workflows/pre-check-CI-updates.yml +++ b/.github/workflows/pre-check-CI-updates.yml @@ -30,7 +30,7 @@ jobs: contents: read uses: ./.github/workflows/reusable-CI-workflow.yml - upload: + coverage: name: Coverage needs: [tests] permissions: diff --git a/.github/workflows/reusable-CI-workflow.yml b/.github/workflows/reusable-CI-workflow.yml index 7e0e9f2..a8bc2f7 100644 --- a/.github/workflows/reusable-CI-workflow.yml +++ b/.github/workflows/reusable-CI-workflow.yml @@ -222,9 +222,9 @@ jobs: needs: [ fetch-supported-versions, tests ] if: ${{ github.event_name == 'push' || ( github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'with-nightly-tests') ) }} runs-on: ubuntu-latest - continue-on-error: true permissions: contents: read + continue-on-error: true env: COMPOSER_IGNORE_PLATFORM_REQ: 'php+' strategy: @@ -246,7 +246,7 @@ jobs: symfony-version: ${{ needs.fetch-supported-versions.outputs.symfony-next }} # Fix - behat/gherkin => Avoid issue with behat <-> gherkin packages (See https://github.com/Behat/Gherkin/issues/317) # Fix - symfony/framework-bundle - Framework bundle <7.0 require php 8.1 minimum ! - pkg-extra-constraints: behat/gherkin:~4.12.0 ${{ ( needs.fetch-supported-versions.outputs.symfony-next == '7.0' && needs.fetch-supported-versions.outputs.php-max == '8.4' ) && 'symfony/framework-bundle:~7.0.0@dev' || '' }} + pkg-extra-constraints: behat/gherkin:~4.12.0 ${{ ( needs.fetch-supported-versions.outputs.symfony-next == '7.0' && needs.fetch-supported-versions.outputs.php-max == '8.4' ) && 'symfony/framework-bundle:~7.0.0@dev' || '' }} - job-name: Symfony - With lowest supported PHP version # Fix - Sf 7.0 require php 8.1 minimum, most of deps require 8.2 ! php-version: ${{ ( needs.fetch-supported-versions.outputs.symfony-next == '7.0' && needs.fetch-supported-versions.outputs.php-min == '8.0' ) && '8.2' || needs.fetch-supported-versions.outputs.php-min }} diff --git a/.github/workflows/reusable-coverage-upload-workflow.yml b/.github/workflows/reusable-coverage-upload-workflow.yml index 9719564..a28b160 100644 --- a/.github/workflows/reusable-coverage-upload-workflow.yml +++ b/.github/workflows/reusable-coverage-upload-workflow.yml @@ -32,6 +32,8 @@ jobs: outputs: commit-sha: ${{ steps.fetch-workflow-metadata.outputs.commit-sha }} run-id: ${{ steps.fetch-workflow-metadata.outputs.run-id }} + branch: ${{ steps.fetch-workflow-metadata.outputs.branch }} + pull-request: ${{ steps.fetch-workflow-metadata.outputs.pull-request }} codacy-uploader: name: Codacy @@ -64,6 +66,6 @@ jobs: run-id: ${{ needs.fetch-info.outputs.run-id }} force-git-commit: ${{ needs.fetch-info.outputs.commit-sha }} force-git-branch: ${{ needs.fetch-info.outputs.branch }} - force-gh-pr: ${{ needs.fetch-info.outputs.pr-number }} + force-gh-pr: ${{ needs.fetch-info.outputs.pull-request }} force-uploader-build: ${{ needs.fetch-info.outputs.run-id }} force-uploader-build-url: ${{ needs.fetch-info.outputs.run-url }} From 7796c6a25a90c6e9887ec94677eb179ffd6db987 Mon Sep 17 00:00:00 2001 From: Yoanm <4410697+yoanm@users.noreply.github.com> Date: Tue, 2 Sep 2025 20:49:58 +0200 Subject: [PATCH 2/2] Improve --- .github/dependabot.yml | 42 +++++++++++++++++++++--------------------- .gitignore | 1 + .scrutinizer.yml | 1 - README.md | 3 ++- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9db6ceb..24db029 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,10 +1,10 @@ version: 2 updates: - # - # - # [GHAction] - # Based on https://github.com/yoanm/shared-config/blob/master/GitHub/dependabot/github-action.yml file - # +# +# +# [GHAction] +# Based on https://github.com/yoanm/shared-config/blob/master/GitHub/dependabot/github-action.yml file +# - package-ecosystem: github-actions directory: / schedule: @@ -14,22 +14,22 @@ updates: prefix: '[dependabot][ghaction] - ' # No need to specify prod/dev for GHAction as there is only "production" updates ! include: scope groups: - # Group all basic updates inside the a single PR - # No need to split prod/dev as there is only prod updates +# Group all basic updates inside the a single PR +# No need to split prod/dev as there is only prod updates all-actions: applies-to: version-updates patterns: ['*'] - # Group all security updates inside the a single PR - # No need to split prod/dev as there is only prod updates - # +Most likely no need to split major and other updates either +# Group all security updates inside the a single PR +# No need to split prod/dev as there is only prod updates +# +Most likely no need to split major and other updates either SECURITY-all: applies-to: security-updates patterns: ['*'] - # - # - # [Composer] - # Based on https://github.com/yoanm/shared-config/blob/master/GitHub/dependabot/composer.yml file - # +# +# +# [Composer] +# Based on https://github.com/yoanm/shared-config/blob/master/GitHub/dependabot/composer.yml file +# - package-ecosystem: composer directory: / schedule: # Create PRs during week-ends, they will be ready on monday morning @@ -41,9 +41,9 @@ updates: prefix-development: '[dependabot][dev][composer] - ' include: scope groups: - # Split basic updates by: - # - prod vs dev - # - major vs others (assuming packages properly follow semver !) +# Split basic updates by: +# - prod vs dev +# - major vs others (assuming packages properly follow semver !) prod-majors: applies-to: version-updates dependency-type: production @@ -62,9 +62,9 @@ updates: applies-to: version-updates dependency-type: development patterns: ['*'] - # Split security updates by: - # - prod vs dev - # - Major prod updates vs other prod updates +# Split security updates by: +# - prod vs dev +# - Major prod updates vs other prod updates SECURITY-prod-major: applies-to: security-updates dependency-type: production diff --git a/.gitignore b/.gitignore index 938ac64..4cb177e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ build #A library must not provide a composer.lock file composer.lock +# Demo app excluded dirs features/demo_app/var/ #Phpunit diff --git a/.scrutinizer.yml b/.scrutinizer.yml index b579dd2..938ad6a 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -41,7 +41,6 @@ build: variables: CI: 'true' TEST_OUTPUT_STYLE: 'pretty' - COMPOSER_OPTIONS: '--optimize-autoloader' COVERAGE_OUTPUT_STYLE: 'clover' COVERAGE_CLOVER_FILE_PATH: 'build/coverage/clover.xml' PHPCS_DISABLE_WARNING: 'true' diff --git a/README.md b/README.md index 621c11b..aba9b9e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ [![License](https://img.shields.io/github/license/yoanm/symfony-jsonrpc-http-server-openapi-doc.svg)](https://github.com/yoanm/symfony-jsonrpc-http-server-openapi-doc) [![Code size](https://img.shields.io/github/languages/code-size/yoanm/symfony-jsonrpc-http-server-openapi-doc.svg)](https://github.com/yoanm/symfony-jsonrpc-http-server-openapi-doc) -[![Dependabot Status](https://api.dependabot.com/badges/status?host=github\&repo=yoanm/symfony-jsonrpc-http-server-openapi-doc)](https://dependabot.com) +![Dependabot Status](https://flat.badgen.net/github/dependabot/yoanm/symfony-jsonrpc-http-server-openapi-doc) +![Last commit](https://badgen.net/github/last-commit/yoanm/symfony-jsonrpc-http-server-openapi-doc) [![Scrutinizer Build Status](https://img.shields.io/scrutinizer/build/g/yoanm/symfony-jsonrpc-http-server-openapi-doc.svg?label=Scrutinizer\&logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/symfony-jsonrpc-http-server-openapi-doc/build-status/master) [![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/yoanm/symfony-jsonrpc-http-server-openapi-doc/master.svg?logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/symfony-jsonrpc-http-server-openapi-doc/?branch=master)