Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #12 from signifly/feat/gh-actions
Browse files Browse the repository at this point in the history
feat: swap travis for Github Actions
  • Loading branch information
pactode authored Oct 8, 2020
2 parents 404447d + 9358cd7 commit 23a4e07
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 29 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check & fix styling

on: [push]

jobs:
style:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Fix style
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs --allow-risky=yes

- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v2.3.0
with:
commit_message: Fix styling
branch: ${{ steps.extract_branch.outputs.branch }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47 changes: 47 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Tests

on: [push, pull_request]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [7.4]
laravel: [8.*, 7.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 8.*
testbench: 6.*
- laravel: 7.*
testbench: 5.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none

- name: Install dependencies
run: |
composer config --global --auth http-basic.repo.packagist.com token ${{ secrets.COMPOSER_TOKEN }}
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Execute tests
run: vendor/bin/phpunit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ vendor
composer.lock
.phpunit.result.cache
.php_cs.cache
.idea
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Easily add login proxy to your Laravel API

[![Latest Version on Packagist](https://img.shields.io/packagist/v/signifly/laravel-janitor.svg?style=flat-square)](https://packagist.org/packages/signifly/laravel-janitor)
[![Build Status](https://img.shields.io/travis/signifly/laravel-janitor/master.svg?style=flat-square)](https://travis-ci.org/signifly/laravel-janitor)
![Tests](https://github.com/signifly/laravel-janitor/workflows/Tests/badge.svg)
[![StyleCI](https://styleci.io/repos/173741214/shield?branch=master)](https://styleci.io/repos/173741214)
[![Quality Score](https://img.shields.io/scrutinizer/g/signifly/laravel-janitor.svg?style=flat-square)](https://scrutinizer-ci.com/g/signifly/laravel-janitor)
[![Total Downloads](https://img.shields.io/packagist/dt/signifly/laravel-janitor.svg?style=flat-square)](https://packagist.org/packages/signifly/laravel-janitor)
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
}
],
"require": {
"php": "^7.2",
"php": "^7.2|^7.3|^7.4",
"guzzlehttp/guzzle": "^6.3",
"illuminate/auth": "~5.8.0|^6.0|^7.0",
"illuminate/contracts": "~5.8.0|^6.0|^7.0",
"illuminate/database": "~5.8.0|^6.0|^7.0",
"illuminate/http": "~5.8.0|^6.0|^7.0",
"illuminate/routing": "~5.8.0|^6.0|^7.0",
"illuminate/support": "~5.8.0|^6.0|^7.0"
"illuminate/auth": "~5.8.0|^6.0|^7.0|^8.0",
"illuminate/contracts": "~5.8.0|^6.0|^7.0|^8.0",
"illuminate/database": "~5.8.0|^6.0|^7.0|^8.0",
"illuminate/http": "~5.8.0|^6.0|^7.0|^8.0",
"illuminate/routing": "~5.8.0|^6.0|^7.0|^8.0",
"illuminate/support": "~5.8.0|^6.0|^7.0|^8.0"
},
"require-dev": {
"orchestra/testbench": "~3.8.0|^4.0|^5.0",
"laravel/passport": "^7.0|^8.0",
"orchestra/testbench": "^4.0|^5.0|^6.0",
"laravel/passport": "^7.0|^8.0|^9.0|^10.0",
"phpunit/phpunit": "^7.0|^8.0|^9.0",
"tymon/jwt-auth": "1.0.x-dev"
},
Expand Down
4 changes: 2 additions & 2 deletions src/JanitorManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class JanitorManager extends Manager implements Factory
*/
protected function createJwtDriver()
{
$config = $this->app['config']['janitor.drivers.jwt'];
$config = $this->container['config']['janitor.drivers.jwt'];

return new JWTProxy($config);
}
Expand All @@ -27,7 +27,7 @@ protected function createJwtDriver()
*/
protected function createPassportDriver()
{
$config = $this->app['config']['janitor.drivers.passport'];
$config = $this->container['config']['janitor.drivers.passport'];

return new PassportProxy($config);
}
Expand Down

0 comments on commit 23a4e07

Please sign in to comment.