Skip to content

Convert Travis to GitHub actions #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about support for PHP 7.4+?

Copy link
Author

@bishopb bishopb Dec 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrunalk I'm keeping the scope narrow on this PR, specifically to emulate the original Travis behavior as closely as possible. Since the original Travis definition tested only on 7.3 and 7.2, I have retained that compatibility. Future releases will sort all this out, so that all documented versions will be under test. That's a bigger fish to fry, so I'm doing that in chunks.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

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
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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'.

Expand Down