diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..3df5eff --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,42 @@ +name: Tests + +on: + push: ~ + pull_request: ~ + +jobs: + phpunit: + name: PHPUnit on ${{ matrix.php-versions }} ${{ matrix.composer-flags }} + runs-on: ubuntu-latest + continue-on-error: ${{ !matrix.stable }} + strategy: + matrix: + php-versions: ['8.0'] + stable: [true] + coverage: [true] + composer-flags: [''] + include: + - php-versions: '8.1' + stable: false + coverage: false + composer-flags: '--ignore-platform-reqs' + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: curl, mbstring + coverage: xdebug + tools: composer:v2 + + - run: composer update --no-progress ${{ matrix.composer-flags }} + + - run: vendor/bin/phpunit --no-coverage + if: ${{ !matrix.coverage }} + + - run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover + if: ${{ matrix.coverage }} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d382ba3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: php -php: - - 8.0 - -before_install: - - sudo apt-get -qq update - -before_script: - - composer self-update - - composer install - -script: vendor/bin/phpunit \ No newline at end of file diff --git a/README.md b/README.md index 25c6a9e..a44eb5d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Latest Version](https://img.shields.io/packagist/v/berlioz/cli-core.svg?style=flat-square)](https://github.com/BerliozFramework/CliCore/releases) [![Software license](https://img.shields.io/github/license/BerliozFramework/CliCore.svg?style=flat-square)](https://github.com/BerliozFramework/CliCore/blob/2.x/LICENSE) -[![Build Status](https://img.shields.io/travis/com/BerliozFramework/CliCore/2.x.svg?style=flat-square)](https://travis-ci.com/BerliozFramework/CliCore) +[![Build Status](https://img.shields.io/github/workflow/status/BerliozFramework/CliCore/Tests/2.x.svg?style=flat-square)](https://github.com/BerliozFramework/CliCore/actions/workflows/tests.yml?query=branch%3A2.x) [![Quality Grade](https://img.shields.io/codacy/grade/4c097c0d66794c59b5126da59170705c/2.x.svg?style=flat-square)](https://www.codacy.com/manual/BerliozFramework/CliCore) [![Total Downloads](https://img.shields.io/packagist/dt/berlioz/cli-core.svg?style=flat-square)](https://packagist.org/packages/berlioz/cli-core)