From c8006ed027c5c941473f1cbbf52ec830b97aada3 Mon Sep 17 00:00:00 2001 From: Stephen Finney Date: Fri, 24 Apr 2020 11:54:24 -0400 Subject: [PATCH 1/3] Replace Travis with Github Actions --- .github/workflows/ci.yml | 43 +++++++++++++++++++++++++++++++++++++ .travis.yml | 46 ---------------------------------------- 2 files changed, 43 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cf6a3c7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + pull_request: + +jobs: + tests: + + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + php: [7.2, 7.3, 7.4] + stability: [prefer-lowest, prefer-stable] + + name: PHP ${{ matrix.php }} - ${{ matrix.stability }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache + key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: pcov + + - name: Install dependencies + run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest + + - name: Execute tests + run: vendor/bin/phpunit --coverage-clover=coverage.clover --verbose + + - name: Upload Code Coverage + run: wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6b01038..0000000 --- a/.travis.yml +++ /dev/null @@ -1,46 +0,0 @@ -language: php - -env: - global: - - SETUP=stable - -matrix: - fast_finish: true - include: - - php: 7.2 - - php: 7.2 - env: SETUP=lowest - - php: 7.3 - - php: 7.3 - env: SETUP=lowest - - php: 7.4 - - php: 7.4 - env: SETUP=lowest - -sudo: false - -cache: - directories: - - $HOME/.composer/cache - -services: - - memcached - - redis-server - - mysql - -before_install: - - phpenv config-rm xdebug.ini || true - - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - printf "\n" | pecl install -f redis - - travis_retry composer self-update - - mysql -e 'CREATE DATABASE forge;' - -install: - - if [[ $SETUP = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --no-suggest; fi - - if [[ $SETUP = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable --no-suggest; fi - -script: phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.clover - -after_script: - - wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover coverage.clover From 9eecf48ac24207922b0416f745460135775d1921 Mon Sep 17 00:00:00 2001 From: Stephen Finney Date: Fri, 19 Jun 2020 11:43:56 -0400 Subject: [PATCH 2/3] Point coverage badge URL to correct location --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index ba0c7a6..2df04c1 100644 --- a/readme.md +++ b/readme.md @@ -12,7 +12,7 @@ Wrapper over the geoPHP Class to make it integrate with Laravel better. | Branch | Status | Coverage | Code Quality | | ------ | :----: | :------: | :----------: | | Develop | [![Build Status](https://travis-ci.org/spinen/laravel-geometry.svg?branch=develop)](https://travis-ci.org/spinen/laravel-geometry) | [![Code Coverage](https://scrutinizer-ci.com/g/spinen/laravel-geometry/badges/coverage.png?b=develop)](https://scrutinizer-ci.com/g/spinen/laravel-geometry/?branch=develop) | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/spinen/laravel-geometry/badges/quality-score.png?b=develop)](https://scrutinizer-ci.com/g/spinen/laravel-geometry/?branch=develop) | -| Master | [![Build Status](https://travis-ci.org/spinen/laravel-geometry.svg?branch=master)](https://travis-ci.org/spinen/laravel-geometry) | [![Code Coverage](https://scrutinizer-ci.com/g/spinen/laravel-geometry/badges/coverage.png?b=develop)](https://scrutinizer-ci.com/g/spinen/laravel-geometry/?branch=develop) | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/spinen/laravel-geometry/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/spinen/laravel-geometry/?branch=master) | +| Master | [![Build Status](https://travis-ci.org/spinen/laravel-geometry.svg?branch=master)](https://travis-ci.org/spinen/laravel-geometry) | [![Code Coverage](https://scrutinizer-ci.com/g/spinen/laravel-geometry/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/spinen/laravel-geometry/?branch=master) | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/spinen/laravel-geometry/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/spinen/laravel-geometry/?branch=master) | ## Prerequisite From 371eb4cef49639d6d93b7f37031a972ead0890f7 Mon Sep 17 00:00:00 2001 From: Stephen Finney Date: Fri, 19 Jun 2020 11:55:24 -0400 Subject: [PATCH 3/3] Use GitHub actions for build status badges --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 2df04c1..6bc603c 100644 --- a/readme.md +++ b/readme.md @@ -11,8 +11,8 @@ Wrapper over the geoPHP Class to make it integrate with Laravel better. | Branch | Status | Coverage | Code Quality | | ------ | :----: | :------: | :----------: | -| Develop | [![Build Status](https://travis-ci.org/spinen/laravel-geometry.svg?branch=develop)](https://travis-ci.org/spinen/laravel-geometry) | [![Code Coverage](https://scrutinizer-ci.com/g/spinen/laravel-geometry/badges/coverage.png?b=develop)](https://scrutinizer-ci.com/g/spinen/laravel-geometry/?branch=develop) | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/spinen/laravel-geometry/badges/quality-score.png?b=develop)](https://scrutinizer-ci.com/g/spinen/laravel-geometry/?branch=develop) | -| Master | [![Build Status](https://travis-ci.org/spinen/laravel-geometry.svg?branch=master)](https://travis-ci.org/spinen/laravel-geometry) | [![Code Coverage](https://scrutinizer-ci.com/g/spinen/laravel-geometry/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/spinen/laravel-geometry/?branch=master) | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/spinen/laravel-geometry/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/spinen/laravel-geometry/?branch=master) | +| Develop | [![Build Status](https://github.com/spinen/laravel-geometry/workflows/CI/badge.svg?branch=develop)](https://github.com/spinen/laravel-geometry/workflows/CI/badge.svg?branch=develop) | [![Code Coverage](https://scrutinizer-ci.com/g/spinen/laravel-geometry/badges/coverage.png?b=develop)](https://scrutinizer-ci.com/g/spinen/laravel-geometry/?branch=develop) | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/spinen/laravel-geometry/badges/quality-score.png?b=develop)](https://scrutinizer-ci.com/g/spinen/laravel-geometry/?branch=develop) | +| Master | [![Build Status](https://github.com/spinen/laravel-geometry/workflows/CI/badge.svg?branch=master)](https://github.com/spinen/laravel-geometry/workflows/CI/badge.svg?branch=master) | [![Code Coverage](https://scrutinizer-ci.com/g/spinen/laravel-geometry/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/spinen/laravel-geometry/?branch=master) | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/spinen/laravel-geometry/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/spinen/laravel-geometry/?branch=master) | ## Prerequisite