Skip to content

Commit

Permalink
Add style ci, run tests on GitHub, drop Laravel 6, add Laravel 9.
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondfrancis committed Mar 31, 2022
1 parent 35e2948 commit 0ff658f
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 61 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Tests

on:
push:
branches:
- main

pull_request:
types: [opened, synchronize, reopened]

jobs:
test:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
fail-fast: false
matrix:
php: [ 7.3, 7.4, 8.0, 8.1 ]
laravel: [ 7.*, 8.*, 9.* ]
dependency-version: [ prefer-lowest, prefer-stable ]
include:
- laravel: 7.*
testbench: 5.*

- laravel: 8.*
testbench: 6.*

- laravel: 9.*
testbench: 7.*

exclude:
- laravel: 9.*
php: 7.3

- laravel: 9.*
php: 7.4

- laravel: 7.*
php: 8.1

- laravel: 8.*
php: 8.1
dependency-version: prefer-lowest

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

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 self-update
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit
11 changes: 11 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
preset: laravel

disabled:
- concat_without_spaces
- not_operator_with_successor_space
- cast_spaces
- trailing_comma_in_multiline_array
- heredoc_to_nowdoc
- phpdoc_summary

risky: false
54 changes: 0 additions & 54 deletions .travis.yml

This file was deleted.

13 changes: 6 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
"authors": [
{
"name": "Aaron Francis",
"email": "[email protected]",
"homepage": "https://aaronfrancis.com"
"email": "[email protected]",
"homepage": "https://hammerstone.dev"
}
],
"require": {
"illuminate/support": "^6.2|^7.0|^8.0"
"illuminate/support": "^7.0|^8.0|^9.0"
},
"require-dev": {
"orchestra/testbench": "^4.2|^5.0",
"phpunit/phpunit": "^8.4",
"mockery/mockery": "^1.3.2"

"orchestra/testbench": "^5.0|^6.0|^7.0",
"mockery/mockery": "^1.3.3",
"phpunit/phpunit": "^8.5.23|^9.5"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 0ff658f

Please sign in to comment.