forked from jenssegers/laravel-rollbar
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
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 |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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+?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.