diff --git a/.gitattributes b/.gitattributes index 641123d..aa11bde 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,5 @@ /.gitattributes export-ignore /.gitignore export-ignore -/.scrutinizer.yml export-ignore -/.travis.yml export-ignore /docs export-ignore /phpunit.xml.dist export-ignore /tests export-ignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f31b7dd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,62 @@ +name: CI + +on: [push, pull_request] + +jobs: + + coding-standards: + name: Coding Standards + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.0' + - name: Install Composer Dependencies + uses: ramsey/composer-install@v1 + - name: Run PHP-CS-Fixer + run: php vendor/bin/php-cs-fixer fix --verbose --dry-run --using-cache=no + - name: Run PHP_CodeSniffer + run: php vendor/bin/phpcs --no-cache --no-colors + + static-analysis: + name: Static Analysis + strategy: + matrix: + os: [ ubuntu-18.04 ] + php: [ '7.1', '7.2', '7.3', '7.4', '8.0' ] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + - name: Install Composer Dependencies + uses: ramsey/composer-install@v1 + - name: Run PHPStan + run: php vendor/bin/phpstan analyse --no-interaction + - name: Run Psalm + run: php vendor/bin/psalm --shepherd + + unit-tests: + name: Unit Tests + strategy: + matrix: + os: [ ubuntu-18.04 ] + php: [ '7.1', '7.2', '7.3', '7.4', '8.0' ] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + - name: Install Composer Dependencies + uses: ramsey/composer-install@v1 + - name: Run unit tests + run: php vendor/bin/phpunit diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index 7c7c845..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,10 +0,0 @@ -filter: - paths: ["src/*"] -tools: - external_code_coverage: true - php_code_coverage: true - php_sim: true - php_mess_detector: true - php_pdepend: true - php_analyzer: true - php_cpd: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 51df7a0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -sudo: false -language: php -php: - - 7.1 - - 7.2 - - 7.3 - - 7.4 - - 8.0 -before_script: - - composer self-update - - composer install -script: - - php vendor/bin/php-cs-fixer fix --verbose --dry-run --using-cache=no - - php vendor/bin/phpcs --no-cache --no-colors - - XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-clover=coverage.clover - - php vendor/bin/phpstan analyse --no-interaction - - php vendor/bin/psalm -after_script: - - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover coverage.clover