From a191008579453d3715beecfd601caea37454eec7 Mon Sep 17 00:00:00 2001 From: Mikhail Trusov Date: Wed, 8 Jan 2025 22:39:40 +0300 Subject: [PATCH 1/5] Added a build status badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 96f29dd..a28fa9f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![ru](docs/ru.svg)](docs/README.ru.md) +![GitHub Workflow Status](https://img.shields.io/github/workflow/status/JustMisha/php-multirunner/CI?label=build) # PHP MultiRunner A package for running multiple processes in parallel in the background and, if necessary, From 8b82ddf45384784b48128ddcae6501ff0f3301f2 Mon Sep 17 00:00:00 2001 From: Mikhail Trusov Date: Fri, 10 Jan 2025 21:28:16 +0300 Subject: [PATCH 2/5] Added license and PHP version badges --- .gitignore | 1 + README.md | 3 +-- docs/README.ru.md | 2 +- docs/license-MIT.svg | 1 + docs/php_version.svg | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 docs/license-MIT.svg create mode 100644 docs/php_version.svg diff --git a/.gitignore b/.gitignore index d3b4a0f..d71c5bd 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /coverage_report.xml /html_docs /phpunit.xml +/clover.xml diff --git a/README.md b/README.md index a28fa9f..5e0e205 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -[![ru](docs/ru.svg)](docs/README.ru.md) -![GitHub Workflow Status](https://img.shields.io/github/workflow/status/JustMisha/php-multirunner/CI?label=build) +[![ru](docs/ru.svg)](docs/README.ru.md) ![PHP versions](docs/php_version.svg) [![license MIT](docs/license-MIT.svg)](LICENSE.md) # PHP MultiRunner A package for running multiple processes in parallel in the background and, if necessary, diff --git a/docs/README.ru.md b/docs/README.ru.md index b7ee3ce..bb01324 100644 --- a/docs/README.ru.md +++ b/docs/README.ru.md @@ -1,4 +1,4 @@ -[![en](en.svg)](../README.md) +[![en](en.svg)](../README.md) ![PHP versions](php_version.svg) [![license MIT](license-MIT.svg)](../LICENSE.md) # PHP MultiRunner Пакет для запуска множества процессов параллельно в фоне и, если необходимо, diff --git a/docs/license-MIT.svg b/docs/license-MIT.svg new file mode 100644 index 0000000..5e0fccf --- /dev/null +++ b/docs/license-MIT.svg @@ -0,0 +1 @@ +license: MITlicenseMIT \ No newline at end of file diff --git a/docs/php_version.svg b/docs/php_version.svg new file mode 100644 index 0000000..2888064 --- /dev/null +++ b/docs/php_version.svg @@ -0,0 +1 @@ +php: 7.4 to 8.4php7.4 to 8.4 \ No newline at end of file From 16f62cc3acb9d5b678d6255291e5fa5a03361e87 Mon Sep 17 00:00:00 2001 From: Mikhail Trusov Date: Fri, 10 Jan 2025 21:28:52 +0300 Subject: [PATCH 3/5] Added cover badge creation --- .github/workflows/test.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c742ef6..cc41988 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,15 +30,26 @@ jobs: php-version: ${{ matrix.php }} ini-values: memory_limit=128M extensions: dom, curl, libxml, mbstring, zip, bcmath, intl - coverage: none + coverage: xdebug - name: Install composer run: composer install --no-interaction --prefer-dist - - name: Execute tests on Linux - if: matrix.os == 'ubuntu-latest' + - name: Execute tests on Linux with cover + if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.3' }} + run: sudo vendor/bin/phpunit --testdox --coverage-clover clover.xml + + - name: Execute tests on Linux with cover + if: ${{ matrix.os == 'ubuntu-latest' && matrix.php != '8.3' }} run: sudo vendor/bin/phpunit --testdox - name: Execute tests on Windows if: matrix.os == 'windows-latest' run: vendor/bin/phpunit.bat --exclude node --testdox + + - name: Generate test coverage badge + if: ${{ matrix.os == 'ubuntu-latest' && matrix.php == '8.3' }} + uses: timkrase/phpunit-coverage-badge@v1.2.0 + with: + coverage_badge_path: 'docs/badge-coverage.svg' + push_badge: true From aefd55a1f369dbe4b0cb1173089cff9642b28a61 Mon Sep 17 00:00:00 2001 From: Mikhail Trusov Date: Fri, 10 Jan 2025 21:49:18 +0300 Subject: [PATCH 4/5] Added GITHUB_TOKEN for cover badge creation --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cc41988..aa0c329 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,3 +53,4 @@ jobs: with: coverage_badge_path: 'docs/badge-coverage.svg' push_badge: true + repo_token: ${{ secrets.GITHUB_TOKEN }} From 67662125351b64fcc5e13ed12e98e7e41bd4a371 Mon Sep 17 00:00:00 2001 From: Github Actions Bot <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:59:16 +0000 Subject: [PATCH 5/5] Update code coverage badge --- docs/badge-coverage.svg | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docs/badge-coverage.svg diff --git a/docs/badge-coverage.svg b/docs/badge-coverage.svg new file mode 100644 index 0000000..5712e1c --- /dev/null +++ b/docs/badge-coverage.svg @@ -0,0 +1,16 @@ + + + + + + + + + coverage + coverage + + + 80 % + 80 % + + \ No newline at end of file