diff --git a/.github/settings.yml b/.github/settings.yml new file mode 100644 index 000000000..41ffc1c9d --- /dev/null +++ b/.github/settings.yml @@ -0,0 +1,49 @@ +# https://github.com/probot/settings + +branches: + - name: master + protection: + enforce_admins: false + required_pull_request_reviews: + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 1 + required_status_checks: + contexts: + - "Grumphp" + strict: false + restrictions: null + +labels: + - name: bug + color: ee0701 + + - name: dependencies + color: 0366d6 + + - name: enhancement + color: 0e8a16 + + - name: question + color: cc317c + + - name: security + color: ee0701 + + - name: stale + color: eeeeee + +repository: + allow_merge_commit: true + allow_rebase_merge: false + allow_squash_merge: false + default_branch: master + description: "A (memory) friendly, easy, lazy and modular collection class." + topics: collection,generator,iterator,yield,immutable + has_downloads: true + has_issues: true + has_pages: false + has_projects: false + has_wiki: false + name: collection + private: false diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 000000000..ad8756541 --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,44 @@ +# https://help.github.com/en/categories/automating-your-workflow-with-github-actions + +on: + - pull_request + - push + +name: "Continuous Integration" + +jobs: + grumphp: + name: "Grumphp" + + runs-on: ubuntu-latest + + strategy: + matrix: + php-binary: + - php7.1 + - php7.2 + - php7.3 + + steps: + - name: "Checkout" + uses: actions/checkout@master + with: + fetch-depth: 1 + + - name: "Composer install" + run: ${{ matrix.php-binary }} $(which composer) install --no-interaction --no-progress --no-suggest + + - name: "Composer install lowest dependencies" + if: matrix.dependencies == 'lowest' + run: ${{ matrix.php-binary }} $(which composer) update --no-interaction --no-progress --no-suggest --prefer-lowest + + - name: "Install Graphviz" + run: sudo apt-get install graphviz + + - name: "Run Grumphp" + run: ${{ matrix.php-binary }} vendor/bin/grumphp run + env: + STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} + + - name: "Scrutinizer" + run: wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c5dba9cb2..000000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: php - -git: - depth: 1 - -cache: - directories: - - "$HOME/.cache/composer" - - "$HOME/.composer/cache" - -php: -- 7.1 -- 7.2 -- 7.3 - -install: -- composer install - -script: -- composer grumphp - -after_success: -- phpenv config-rm xdebug.ini -- composer scrutinizer diff --git a/README.md b/README.md index 0a59b15e8..24f5e3826 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Latest Stable Version](https://img.shields.io/packagist/v/drupol/collection.svg?style=flat-square)](https://packagist.org/packages/drupol/collection) [![GitHub stars](https://img.shields.io/github/stars/drupol/collection.svg?style=flat-square)](https://packagist.org/packages/drupol/collection) [![Total Downloads](https://img.shields.io/packagist/dt/drupol/collection.svg?style=flat-square)](https://packagist.org/packages/drupol/collection) - [![Build Status](https://img.shields.io/travis/drupol/collection/master.svg?style=flat-square)](https://travis-ci.org/drupol/collection) + [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/drupol/collection/Continuous%20Integration?style=flat-square)](https://github.com/drupol/collection/actions) [![Scrutinizer code quality](https://img.shields.io/scrutinizer/quality/g/drupol/collection/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/drupol/collection/?branch=master) [![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/drupol/collection/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/drupol/collection/?branch=master) [![Mutation testing badge](https://badge.stryker-mutator.io/github.com/drupol/collection/master)](https://stryker-mutator.github.io) diff --git a/composer.json b/composer.json index 77e0b16da..54a3822e7 100644 --- a/composer.json +++ b/composer.json @@ -19,15 +19,13 @@ "php": ">= 7.1.3" }, "require-dev": { - "drupol/php-conventions": "^1", - "drupol/phpspec-annotation": "^1.2", - "drupol/phpspec-code-coverage": "^5", - "infection/infection": "^0.13", + "drupol/php-conventions": "^1.6.8", + "friends-of-phpspec/phpspec-code-coverage": "^4.3.2", + "infection/infection": "^0.13.6", "phpbench/phpbench": "^0.16.9", - "phpspec/phpspec": "^5", - "phpstan/phpstan": "^0.11", - "phpstan/phpstan-strict-rules": "^0.11.1", - "scrutinizer/ocular": "^1.6" + "phpspec/phpspec": "^6.1", + "phpstan/phpstan": "^0.12.3", + "phpstan/phpstan-strict-rules": "^0.12" }, "config": { "sort-packages": true @@ -43,14 +41,11 @@ } }, "scripts": { - "apigen": "./vendor/bin/apigen generate src --destination build/docs", "bench": "./vendor/bin/phpbench run --report='generator: \"table\", cols: [ \"suite\", \"subject\", \"mean\", \"diff\", \"mem_peak\", \"mem_real\"], break: [\"benchmark\"]'", - "codacy": "./vendor/bin/codacycoverage clover build/logs/clover.xml", "grumphp": "./vendor/bin/grumphp run", "infection": "./vendor/bin/infection run -j 10", "phpcbf": "./vendor/bin/phpcbf --ignore=vendor .", "phpcs": "./vendor/bin/phpcs --ignore=vendor .", - "phpspec": "./vendor/bin/phpspec run", - "scrutinizer": "./vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml" + "phpspec": "./vendor/bin/phpspec run" } } diff --git a/infection.json.dist b/infection.json.dist index 18caf6070..3fe5fe5bc 100644 --- a/infection.json.dist +++ b/infection.json.dist @@ -14,6 +14,5 @@ "branch": "master" } }, - "testFramework":"phpspec", - "tmpDir": "build" + "testFramework":"phpspec" }