From 0ec7efd23c60acbc5739345ad58d0b1800097839 Mon Sep 17 00:00:00 2001 From: Simon Frings Date: Wed, 22 Mar 2023 10:07:03 +0100 Subject: [PATCH] Update test suite and report failed assertions --- .github/workflows/ci.yml | 25 ++++++++++++++++--------- README.md | 16 ++++++++-------- composer.json | 10 +++++++--- phpunit.xml.dist | 17 +++++++++++++---- phpunit.xml.legacy | 10 +++++++++- 5 files changed, 53 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38ed72e..88c94c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,8 @@ on: jobs: PHPUnit: - runs-on: ubuntu-latest + name: PHPUnit (PHP ${{ matrix.php }}) + runs-on: ubuntu-22.04 strategy: matrix: php: @@ -21,11 +22,12 @@ jobs: - 5.4 - 5.3 steps: - - uses: actions/checkout@v2 - - name: Setup PHP + - uses: actions/checkout@v3 uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} + coverage: xdebug + ini-file: development - run: composer install - run: vendor/bin/phpunit --coverage-text if: ${{ matrix.php >= 7.3 }} @@ -34,11 +36,16 @@ jobs: PHPUnit-hhvm: name: PHPUnit (HHVM) - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 + continue-on-error: true steps: - - uses: actions/checkout@v2 - - uses: azjezz/setup-hhvm@v1 + - uses: actions/checkout@v3 + - run: cp "$(which composer)" composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM + - name: Run hhvm composer.phar install + uses: docker://hhvm/hhvm:3.30-lts-latest with: - version: lts-3.30 - - run: hhvm $(which composer) install - - run: hhvm vendor/bin/phpunit + args: hhvm composer.phar install + - name: Run hhvm vendor/bin/phpunit + uses: docker://hhvm/hhvm:3.30-lts-latest + with: + args: hhvm vendor/bin/phpunit diff --git a/README.md b/README.md index 5810be5..c995a72 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # clue/reactphp-zenity -[![CI status](https://github.com/clue/reactphp-zenity/workflows/CI/badge.svg)](https://github.com/clue/reactphp-zenity/actions) +[![CI status](https://github.com/clue/reactphp-zenity/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/reactphp-zenity/actions) [![installs on Packagist](https://img.shields.io/packagist/dt/clue/zenity-react?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/zenity-react) Zenity allows you to build graphical desktop (GUI) applications in PHP, built on top of [ReactPHP](https://reactphp.org/). @@ -292,13 +292,13 @@ $builder->warning($text, $title = null); ## Install -The recommended way to install this library is [through Composer](https://getcomposer.org). +The recommended way to install this library is [through Composer](https://getcomposer.org/). [New to Composer?](https://getcomposer.org/doc/00-intro.md) This will install the latest supported version: ```bash -$ composer require clue/zenity-react:^0.4.4 +composer require clue/zenity-react:^0.4.4 ``` See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades. @@ -306,7 +306,7 @@ See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades. This project aims to run on any platform and thus does not require any PHP extensions and supports running on legacy PHP 5.3 through current PHP 8+ and HHVM. -It's *highly recommended to use PHP 7+* for this project. +It's *highly recommended to use the latest supported PHP version* for this project. Obviously, this library requires the Zenity binary itself. Zenity already ships with Ubuntu-based distributions and should not require any installation there. @@ -314,7 +314,7 @@ On Debian- and Ubuntu-based distributions you can make sure it's installed like ```bash # usually not required -$ sudo apt-get install zenity +sudo apt-get install zenity ``` Otherwise you may have to install Zenity yourself (use your favorite search engine, download the appropriate realease tarball or compile from soure). @@ -332,16 +332,16 @@ $launcher->setBin('/path/to/zenity'); ## Tests To run the test suite, you first need to clone this repo and then install all -dependencies [through Composer](https://getcomposer.org): +dependencies [through Composer](https://getcomposer.org/): ```bash -$ composer install +composer install ``` To run the test suite, go to the project root and run: ```bash -$ php vendor/bin/phpunit +php vendor/bin/phpunit ``` ## License diff --git a/composer.json b/composer.json index bb99145..d1f045d 100644 --- a/composer.json +++ b/composer.json @@ -18,12 +18,16 @@ }, "require-dev": { "clue/block-react": "^1.1", - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8" }, "autoload": { - "psr-4": { "Clue\\React\\Zenity\\": "src/" } + "psr-4": { + "Clue\\React\\Zenity\\": "src/" + } }, "autoload-dev": { - "psr-4": { "Clue\\Tests\\React\\Zenity\\": "tests/" } + "psr-4": { + "Clue\\Tests\\React\\Zenity\\": "tests/" + } } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d502912..3d74758 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,11 +1,12 @@ - - + + convertDeprecationsToExceptions="true"> ./tests/ @@ -16,4 +17,12 @@ ./src/ + + + + + + + + diff --git a/phpunit.xml.legacy b/phpunit.xml.legacy index 6534d8d..9248998 100644 --- a/phpunit.xml.legacy +++ b/phpunit.xml.legacy @@ -1,6 +1,6 @@ - + ./src/ + + + + + + + +