From ca35d145c40da32881ac06e43009aaec860310ca Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 12 Oct 2020 15:52:57 +0200 Subject: [PATCH 1/3] Ignore artifact file --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e9dae2b..f06a3d0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /vendor/ /composer.phar /composer.lock +/.phpunit.result.cache From 418887daacf82817e4416d45193c5e6520b5a150 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 12 Oct 2020 15:53:59 +0200 Subject: [PATCH 2/3] Allow installing on PHP 8 --- .github/CONTRIBUTING.md | 13 ++++++++++ .github/FUNDING.yml | 12 +++++++++ .github/pull_request_template.md | 5 ++++ .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++ composer.json | 2 +- 5 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/FUNDING.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/ci.yml diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..7ff968f --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,13 @@ +# Contributing + +First of all, **thank you** for contributing! + +Here are a few rules to follow in order to ease code reviews and merging: + +- follow the coding standard of the project +- run the test suite +- write (or update) tests when applicable +- write documentation for new features +- use [commit messages that make sense](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) + +When creating your pull request on GitHub, please write a description which gives the context and/or explains why you are creating it. diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..12bc4cd --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: mnapoli # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..712d96f --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,5 @@ + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..91e51f8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + push: + branches: ['master'] + pull_request: + branches: ['*'] + schedule: + - cron: '0 0 * * *' + +jobs: + + tests: + name: Tests - PHP ${{ matrix.php }} ${{ matrix.dependency-version }} + runs-on: ubuntu-latest + timeout-minutes: 15 + strategy: + matrix: + php: [ '7.3', '7.4', '8.0' ] + dependency-version: [ '' ] + include: + - php: '7.3' + dependency-version: '--prefer-lowest' + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + tools: composer:v2 + coverage: none + - name: Cache Composer dependencies + uses: actions/cache@v2 + with: + path: ~/.composer/cache + key: php-${{ matrix.php }}-composer-locked-${{ hashFiles('composer.lock') }} + restore-keys: php-${{ matrix.php }}-composer-locked- + - name: Install PHP dependencies + run: composer update ${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-progress --no-suggest + - name: PHPUnit + run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 8088333..a524820 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } }, "require": { - "php": "^7.3", + "php": ">=7.3", "phpunit/phpunit": "^8.5|^9.0" } } From eee2da7aa98dda7073174bc88ece32b636fd7e5c Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 12 Oct 2020 15:56:34 +0200 Subject: [PATCH 3/3] Remove Travis CI --- .coveralls.yml | 2 -- .gitattributes | 3 +-- .travis.yml | 46 ---------------------------------------------- README.md | 2 -- 4 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 .coveralls.yml delete mode 100644 .travis.yml diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index bc71b62..0000000 --- a/.coveralls.yml +++ /dev/null @@ -1,2 +0,0 @@ -coverage_clover: clover.xml -json_path: coveralls-upload.json diff --git a/.gitattributes b/.gitattributes index 109a2fa..e958a92 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,9 +1,8 @@ # .gitattributes +.github/ export-ignore tests/ export-ignore -.coveralls.yml export-ignore .gitattributes export-ignore .gitignore export-ignore -.travis.yml export-ignore phpunit.xml.dist export-ignore # Auto detect text files and perform LF normalization diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0e2c925..0000000 --- a/.travis.yml +++ /dev/null @@ -1,46 +0,0 @@ -language: php - -sudo: false - -notifications: - email: - on_success: never - -php: - - 7.3 - - 7.4 - - nightly - -env: - - COMPOSER_FLAGS="--prefer-lowest" - - COMPOSER_FLAGS="" - -stages: - - test - - test with coverage - -cache: - directories: - - $HOME/.composer/cache - -before_install: - - phpenv config-rm xdebug.ini || echo "xdebug not available" - - composer self-update - -install: travis_retry composer update --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction --no-suggest $COMPOSER_FLAGS -vv - -script: vendor/bin/phpunit --colors --columns 117 --no-coverage - -jobs: - allow_failures: - - php: nightly - include: - - php: nightly - env: COMPOSER_FLAGS="--ignore-platform-reqs" - - - stage: test with coverage - os: linux - php: 7.3 - env: COMPOSER_FLAGS="" - before_install: composer self-update - script: vendor/bin/phpunit --colors --coverage-text diff --git a/README.md b/README.md index 12c22c3..8d77498 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ Helpers to build PHPUnit mock objects easily. -[![Build Status](https://travis-ci.org/mnapoli/phpunit-easymock.png?branch=master)](https://travis-ci.org/mnapoli/phpunit-easymock) -[![Coverage Status](https://coveralls.io/repos/mnapoli/phpunit-easymock/badge.png?branch=master)](https://coveralls.io/r/mnapoli/phpunit-easymock?branch=master) [![Total Downloads](https://poser.pugx.org/mnapoli/phpunit-easymock/downloads)](https://packagist.org/packages/mnapoli/phpunit-easymock) ## Why?