diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..36c1b20 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,47 @@ +on: + pull_request: + schedule: + - cron: "0 0 * * *" + +concurrency: + group: ${{ github.head_ref || 'cron' }} + cancel-in-progress: true + +jobs: + tests: + runs-on: ubuntu-latest + strategy: + matrix: + php-version: + - '8.1' + - '8.0' + - '7.4' + - '7.3' + - '7.2' + - '7.1' + - '7.0' + - '5.6' + + name: PHP ${{ matrix.php-version }} + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + + - name: Install Dependencies + run: composer require squizlabs/php_codesniffer phpmd/phpmd + + - name: PHPUnit + run: vendor/bin/phpunit + + - name: PHPCS + run: vendor/bin/phpcs --standard=PSR2 classes/ tests/ + + - name: PHPMD + run: vendor/bin/phpmd classes/ text cleancode,codesize,controversial,design,naming,unusedcode diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c9b3fcd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: php - -cache: - directories: - - $HOME/.composer/cache - -php: - - 8.0 - - 7.4 - - 7.3 - - 7.2 - - 7.1 - - 7.0 - - 5.6 - -matrix: - fast_finish: true - -install: - - composer require squizlabs/php_codesniffer - - composer require phpmd/phpmd - -script: - - vendor/bin/phpunit - - vendor/bin/phpcs --standard=PSR2 classes/ tests/ - - vendor/bin/phpmd classes/ text cleancode,codesize,controversial,design,naming,unusedcode diff --git a/README.md b/README.md index 45d5439..f68aa43 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![.github/workflows/tests.yml](https://github.com/php-mock/php-mock-integration/actions/workflows/tests.yml/badge.svg)](https://github.com/php-mock/php-mock-integration/actions/workflows/tests.yml) + # PHP-Mock integration package This is a support package for PHP-Mock integration into other frameworks. @@ -9,7 +11,7 @@ You'll find these integrations: - [php-mock/php-mock-prophecy](https://github.com/php-mock/php-mock-prophecy) - Prophecy (phpspec) integration -# License and authors +## License and authors This project is free and under the WTFPL. Responsable for this project is Markus Malkusch markus@malkusch.de. @@ -18,5 +20,3 @@ Responsable for this project is Markus Malkusch markus@malkusch.de. If you like PHP-Mock and feel generous donate a few Bitcoins here: [1335STSwu9hST4vcMRppEPgENMHD2r1REK](bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK) - -[![Build Status](https://travis-ci.org/php-mock/php-mock-integration.svg?branch=master)](https://travis-ci.org/php-mock/php-mock-integration)