Skip to content

Commit 8b7a989

Browse files
author
Bishop Bettini
authored
Merge pull request #107 from rollbar/chore/CH-76807/travis-to-github-action
Convert Travis to GitHub actions
2 parents 9ffed90 + 044f08c commit 8b7a989

File tree

3 files changed

+74
-27
lines changed

3 files changed

+74
-27
lines changed

.github/workflows/ci.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Primary CI checks for Rollbar-PHP-Laravel.
2+
#
3+
# Test with act:
4+
# brew install act
5+
# act -P ubuntu-latest=shivammathur/node:latest
6+
#
7+
# @see https://github.com/nektos/act/issues/329
8+
name: Rollbar-PHP-Laravel CI
9+
10+
# Fire this action on pushes to main branch (master) as well as pull requests
11+
# (push: without any configuration assumes this). Also, run every day at 02:42
12+
# GMT -- this catches failures from dependencies that update indepdently.
13+
on:
14+
push:
15+
schedule:
16+
- cron: '42 2 * * *'
17+
18+
jobs:
19+
# Check that this runs on PHP on all versions we claim to support, on both
20+
# UNIX-like and Windows environments, and that use both the lowest possible
21+
# compatible version as well as the most-recent stable version. This will
22+
# fail-fast by default, so we include our edgiest versions (currently 7.4)
23+
# first as they're most likely to fail.
24+
# @seealso https://freek.dev/1546
25+
# @seealso https://www.dereuromark.de/2019/01/04/test-composer-dependencies-with-prefer-lowest/
26+
php-tests:
27+
strategy:
28+
matrix:
29+
php: [7.3, 7.2]
30+
dependency: [stable]
31+
os: [ubuntu]
32+
33+
name: PHP ${{ matrix.php }} on ${{ matrix.os }}, ${{ matrix.dependency }} dependencies preferred
34+
runs-on: ${{ matrix.os }}-latest
35+
steps:
36+
- name: Checkout the code
37+
uses: actions/checkout@v2
38+
39+
- name: Install PHP and composer environment
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: ${{ matrix.php }}
43+
extensions: curl
44+
ini-values: ${{ matrix.ini }}
45+
coverage: xdebug
46+
47+
- name: Get composer cache directory
48+
id: composer-cache
49+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
50+
51+
- name: Cache dependencies
52+
uses: actions/cache@v2
53+
with:
54+
path: ${{ steps.composer-cache.outputs.dir }}
55+
key: ${{ matrix.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.dependency }}-
56+
restore-keys: ${{ matrix.os }}-composer-${{ matrix.dependency }}-
57+
58+
- name: Install dependencies
59+
run: composer update --prefer-${{ matrix.dependency }} --prefer-dist --no-interaction
60+
61+
- name: Make logs directory
62+
run: mkdir -p build/logs
63+
64+
- name: Execute tests
65+
run: composer test
66+
67+
- name: Report results
68+
if: success()
69+
run: ./vendor/bin/php-coveralls -v || true

.travis.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Rollbar for Laravel [![Build Status](https://travis-ci.org/rollbar/rollbar-php-laravel.svg?branch=master)](https://travis-ci.org/rollbar/rollbar-php-laravel)
1+
# Rollbar for Laravel
2+
3+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/rollbar/rollbar-laravel.svg?style=flat-square)](https://packagist.org/packages/rollbar/rollbar-laravel)
4+
![Build Status](https://github.com/rollbar/rollbar-php-laravel/workflows/Rollbar-PHP-Laravel%20CI/badge.svg)
5+
[![Total Downloads](https://img.shields.io/packagist/dt/rollbar/rollbar-laravel.svg?style=flat-square)](https://packagist.org/packages/rollbar/rollbar-laravel)
26

37
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'.
48

0 commit comments

Comments
 (0)