diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1646a38 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,64 @@ +name: Build + +on: + push: + pull_request: + +jobs: + json-validation: + name: Json validation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: shivammathur/setup-php@v2 + with: + php-version: 7.3 + + - name: Validate composer.json + run: composer validate + + tests: + needs: [ json-validation ] + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php-versions: [ '7.3', '7.4', '8.0' ] + composer-deps: [ 'lowest', 'locked', 'highest' ] + php-unit-versions: [ '8.5.10', '9.0', '9.3', '9.5' ] + exclude: + - composer-deps: 'lowest' + php-unit-versions: '9.0' + - composer-deps: 'lowest' + php-unit-versions: '9.3' + - composer-deps: 'lowest' + php-unit-versions: '9.5' + - composer-deps: 'locked' + php-unit-versions: '8.5.10' + - composer-deps: 'highest' + php-unit-versions: '8.5.10' + name: Tests - PHP ${{ matrix.php-versions }} - Deps ${{ matrix.composer-deps }} - PHPUnit ${{ matrix.php-unit-versions }} + steps: + - uses: actions/checkout@v2 + + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + + - name: Require PHPUnit + run: composer require "phpunit/phpunit:~${{ matrix.php-unit-versions }}" --no-update; + + - name: Composer install + uses: ramsey/composer-install@v1 + with: + dependency-versions: "${{ matrix.composer-deps }}" + + - name: Static analysis + run: bin/phpstan.phar analyze src tests + + - name: Run tests + run: | + find tests/ -name "*Test.php" | php fastest -v + ./fastest -x phpunit.xml.dist -v "bin/phpunit {}" + bin/behat --config=adapters/Behat/behat.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b1499b9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: php -dist: bionic - -php: - - 7.3 - - 7.4 - - 8.0 - -env: - matrix: - - PREFER_LOWEST="--prefer-lowest" PHPUNIT_VERSION="~8.5.10" - - PREFER_LOWEST="" PHPUNIT_VERSION="~9.0" - - PREFER_LOWEST="" PHPUNIT_VERSION="~9.3" - - PREFER_LOWEST="" PHPUNIT_VERSION="~9.5" - -cache: - directories: - - $HOME/.composer/cache - -before_script: - - phpenv config-rm xdebug.ini - - composer selfupdate - - composer require "phpunit/phpunit:$PHPUNIT_VERSION" --no-update; - - if [ ${TRAVIS_PHP_VERSION:0:3} == "8.0" ]; then composer require "symfony/config:^3.4.44|^4.4.12" "symfony/dependency-injection:^3.4.44|^4.4.12" --no-update; fi; - - composer update $PREFER_LOWEST --prefer-dist --no-interaction --no-progress --ignore-platform-req=php - -script: - - bin/phpstan.phar analyze src tests - - find tests/ -name "*Test.php" | php fastest -v - - ./fastest -x phpunit.xml.dist -v "bin/phpunit {}" - - bin/behat --config=adapters/Behat/behat.yml diff --git a/README.md b/README.md index ec2e720..20a7b22 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Fastest - simple parallel testing execution =========================================== -[![Build Status](https://secure.travis-ci.org/liuggio/fastest.png?branch=master)](http://travis-ci.org/liuggio/fastest) +![example branch parameter](https://github.com/liuggio/fastest/actions/workflows/build.yml/badge.svg?branch=master) [![Latest Stable Version](https://poser.pugx.org/liuggio/fastest/v/stable.svg)](https://packagist.org/packages/liuggio/fastest) [![Latest Unstable Version](https://poser.pugx.org/liuggio/fastest/v/unstable.svg)](https://packagist.org/packages/liuggio/fastest) ## Only one thing @@ -268,10 +268,6 @@ If you want to use it with phpunit you may want to install phpunit/phpunit as de ### Run this test with `fastest` -**Easy** see [.travis.yml](.travis.yml#L18) file - -## The arguments: - ``` Usage: fastest [-p|--process="..."] [-b|--before="..."] [-x|--xml="..."] [-o|--preserve-order] [--no-errors-summary] [execute] @@ -295,6 +291,8 @@ Options: ``` +e.g. `./fastest -x phpunit.xml.dist -v "bin/phpunit {}"` + ### Known problems If you're faceing problems with unknown command errors, make sure your [variables-order](http://us.php.net/manual/en/ini.core.php#ini.variables-order) `php.ini` setting contains `E`. If not, your enviroment variables are not set, and commands that are in your `PATH` will not work.