diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c261320 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,69 @@ +# Primary CI checks for Rollbar-PHP-Laravel. +# +# Test with act: +# brew install act +# act -P ubuntu-latest=shivammathur/node:latest +# +# @see https://github.com/nektos/act/issues/329 +name: Rollbar-PHP-Laravel CI + +# Fire this action on pushes to main branch (master) as well as pull requests +# (push: without any configuration assumes this). Also, run every day at 02:42 +# GMT -- this catches failures from dependencies that update indepdently. +on: + push: + schedule: + - cron: '42 2 * * *' + +jobs: + # Check that this runs on PHP on all versions we claim to support, on both + # UNIX-like and Windows environments, and that use both the lowest possible + # compatible version as well as the most-recent stable version. This will + # fail-fast by default, so we include our edgiest versions (currently 7.4) + # first as they're most likely to fail. + # @seealso https://freek.dev/1546 + # @seealso https://www.dereuromark.de/2019/01/04/test-composer-dependencies-with-prefer-lowest/ + php-tests: + strategy: + matrix: + php: [7.3, 7.2] + dependency: [stable] + os: [ubuntu] + + name: PHP ${{ matrix.php }} on ${{ matrix.os }}, ${{ matrix.dependency }} dependencies preferred + runs-on: ${{ matrix.os }}-latest + steps: + - name: Checkout the code + uses: actions/checkout@v2 + + - name: Install PHP and composer environment + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl + ini-values: ${{ matrix.ini }} + coverage: xdebug + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ matrix.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.dependency }}- + restore-keys: ${{ matrix.os }}-composer-${{ matrix.dependency }}- + + - name: Install dependencies + run: composer update --prefer-${{ matrix.dependency }} --prefer-dist --no-interaction + + - name: Make logs directory + run: mkdir -p build/logs + + - name: Execute tests + run: composer test + + - name: Report results + if: success() + run: ./vendor/bin/php-coveralls -v || true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 543d711..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: php -dist: trusty - -php: - - 7.3 - - 7.2 - - nightly - -matrix: - allow_failures: - - php: nightly - -sudo: false - -install: composer install --no-interaction - -before_script: - - travis_retry composer self-update - - travis_retry composer install --dev --no-interaction - -script: - - mkdir -p build/logs - - composer test - -after_success: - - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php vendor/bin/coveralls -v; fi;' diff --git a/README.md b/README.md index 44cf1af..1bde29b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -# Rollbar for Laravel [![Build Status](https://travis-ci.org/rollbar/rollbar-php-laravel.svg?branch=master)](https://travis-ci.org/rollbar/rollbar-php-laravel) +# Rollbar for Laravel + +[![Latest Version on Packagist](https://img.shields.io/packagist/v/rollbar/rollbar-laravel.svg?style=flat-square)](https://packagist.org/packages/rollbar/rollbar-laravel) +![Build Status](https://github.com/rollbar/rollbar-php-laravel/workflows/Rollbar-PHP-Laravel%20CI/badge.svg) +[![Total Downloads](https://img.shields.io/packagist/dt/rollbar/rollbar-laravel.svg?style=flat-square)](https://packagist.org/packages/rollbar/rollbar-laravel) Rollbar error monitoring integration for Laravel projects. This library adds a listener to Laravel's logging component. Laravel's session information will be sent in to Rollbar, as well as some other helpful information such as 'environment', 'server', and 'session'.