From a755d56db3ce6b81f58341f6e47b4292ed574431 Mon Sep 17 00:00:00 2001 From: Yoanm <4410697+yoanm@users.noreply.github.com> Date: Tue, 2 Sep 2025 18:51:03 +0200 Subject: [PATCH 1/4] Harmonize CI --- .github/workflows/CI.yml | 4 ---- .github/workflows/auto-merge-dependabot.yml | 6 ++++++ .github/workflows/coverage-upload.yml | 2 +- .github/workflows/pre-check-CI-updates.yml | 5 +---- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3d4649b1..b262c396 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,11 +10,8 @@ on: # Build any PRs and main branch changes # In case of updates to those workflows, they must be pre-checked by `pre-check-CI-updates.yml` rather than this workflow ! # Any updates on those workflows are expected to be restricted to those workflows only ! (no update on code for instance) - '.github/workflows/pre-check-CI-updates.yml' - - '.github/workflows/CI.yml' - - '.github/workflows/coverage-upload.yml' - '.github/workflows/reusable-CI-workflow.yml' - '.github/workflows/reusable-coverage-upload-workflow.yml' - - '.github/workflows/auto-merge-dependabot.yml' push: branches: [ master ] schedule: @@ -29,7 +26,6 @@ concurrency: env: TEST_OUTPUT_STYLE: pretty - COMPOSER_OPTIONS: --optimize-autoloader jobs: tests: diff --git a/.github/workflows/auto-merge-dependabot.yml b/.github/workflows/auto-merge-dependabot.yml index d9726abf..8ff6afc4 100644 --- a/.github/workflows/auto-merge-dependabot.yml +++ b/.github/workflows/auto-merge-dependabot.yml @@ -18,6 +18,12 @@ jobs: uses: dependabot/fetch-metadata@v2.4.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" + + - name: Add custom labels + run: gh pr edit "${{github.event.pull_request.html_url}}" --add-label "with-nightly-tests" + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Enable auto-merge for Dependabot PRs if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'}} run: gh pr merge --auto --squash "$PR_URL" diff --git a/.github/workflows/coverage-upload.yml b/.github/workflows/coverage-upload.yml index 7953f5df..0d66a5d2 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 63b9f898..1a9abcc5 100644 --- a/.github/workflows/pre-check-CI-updates.yml +++ b/.github/workflows/pre-check-CI-updates.yml @@ -12,11 +12,8 @@ on: branches: [master] # Only for PR targeting master branch paths: # /!\ Duplicate the same list as `on.pull_request.paths-ignore` property value for CI workflow ! - '.github/workflows/pre-check-CI-updates.yml' # This workflow - - '.github/workflows/CI.yml' - - '.github/workflows/coverage-upload.yml' - '.github/workflows/reusable-CI-workflow.yml' - '.github/workflows/reusable-coverage-upload-workflow.yml' - - '.github/workflows/auto-merge-dependabot.yml' permissions: contents: read @@ -33,7 +30,7 @@ jobs: contents: read uses: ./.github/workflows/reusable-CI-workflow.yml - upload: + coverage: name: Coverage needs: [tests] permissions: From 3b68625ce3856b0d89f76c1304fd95ebd4a2dc8f Mon Sep 17 00:00:00 2001 From: Yoanm <4410697+yoanm@users.noreply.github.com> Date: Tue, 2 Sep 2025 19:02:29 +0200 Subject: [PATCH 2/4] Add CODEOWNERS --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..a88b281c --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @yoanm From f0ba119a960e8a226de84462ad1d99adc5b0b986 Mon Sep 17 00:00:00 2001 From: Yoanm <4410697+yoanm@users.noreply.github.com> Date: Tue, 2 Sep 2025 19:16:14 +0200 Subject: [PATCH 3/4] Improve --- .scrutinizer.yml | 1 - README.md | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index b579dd24..938ad6a7 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 d13ddd82..fdf4ee08 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ [![License](https://img.shields.io/github/license/yoanm/php-jsonrpc-server-sdk.svg)](https://github.com/yoanm/php-jsonrpc-server-sdk) [![Code size](https://img.shields.io/github/languages/code-size/yoanm/php-jsonrpc-server-sdk.svg)](https://github.com/yoanm/php-jsonrpc-server-sdk) -[![Dependabot Status](https://api.dependabot.com/badges/status?host=github\&repo=yoanm/php-jsonrpc-server-sdk)](https://dependabot.com) +![Dependabot Status](https://flat.badgen.net/github/dependabot/yoanm/php-jsonrpc-server-sdk) +![Last commit](https://badgen.net/github/last-commit/yoanm/php-jsonrpc-server-sdk) [![Scrutinizer Build Status](https://img.shields.io/scrutinizer/build/g/yoanm/php-jsonrpc-server-sdk.svg?label=Scrutinizer\&logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/php-jsonrpc-server-sdk/build-status/master) [![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/yoanm/php-jsonrpc-server-sdk/master.svg?logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/php-jsonrpc-server-sdk/?branch=master) From 8aca54420a9a650c1b1f474414a2bdd27bd977a2 Mon Sep 17 00:00:00 2001 From: Yoanm <4410697+yoanm@users.noreply.github.com> Date: Tue, 2 Sep 2025 21:10:22 +0200 Subject: [PATCH 4/4] Improve --- .gitignore | 1 + .remarkrc | 6 +++++- Makefile | 8 ++++++++ phpunit.xml.dist | 37 +++++++++++++++++-------------------- 4 files changed, 31 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 58a28a38..8f6f63c4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ build #A library must not provide a composer.lock file composer.lock +#Phpunit .phpunit.result.cache diff --git a/.remarkrc b/.remarkrc index 0527df56..5bf1fca4 100644 --- a/.remarkrc +++ b/.remarkrc @@ -1,6 +1,10 @@ { "plugins": [ "remark-preset-lint-consistent", - "remark-preset-lint-recommended" + "remark-preset-lint-recommended", + [ + "remark-lint-list-item-indent", + "space" + ] ] } diff --git a/Makefile b/Makefile index fdbc8a14..0c3c84f5 100644 --- a/Makefile +++ b/Makefile @@ -109,5 +109,13 @@ scrutinizer-behat: create-build-directories: mkdir -p ${PHPUNIT_COVERAGE_DIRECTORY} ${BEHAT_COVERAGE_DIRECTORY} ${REPORTS_DIRECTORY} +.PHONY: configure-dev-env +configure-dev-env: + npm install --global remark-cli remark-preset-lint-consistent remark-preset-lint-recommended remark-lint-list-item-indent + +.PHONY: lint-markdown +lint-markdown: + npx remark . --output + .PHONY: build install configure test test-unit test-functional codestyle create-build-directories scrutinizer-behat scrutinizer-phpunit .DEFAULT: build diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 4e1847a9..0b447947 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,8 +1,7 @@ - - - - - - - - tests/Functional/* - - - tests/Technical/* - - - - - - src - - + + + src + + + + + + + + tests/Functional + + + tests/Technical + +