Skip to content

Commit

Permalink
Laravel 9
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Feb 10, 2022
1 parent f8eeb08 commit 3b344cf
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 85 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,34 @@ name: CI

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]

branches: [master]

jobs:
phpcs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP environment
uses: shivammathur/setup-php@v2
- name: Install dependencies
run: composer install
- name: PHPCSFixer check
run: composer check-style
- uses: actions/checkout@v2
- name: Setup PHP environment
uses: shivammathur/setup-php@v2
- name: Install dependencies
run: composer install
- name: PHPCSFixer check
run: composer check-style
phpunit:
strategy:
matrix:
php_version: [7.4, 8.0]
php_version: [8.0, 8.1]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP environment
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
coverage: xdebug
- name: Install dependencies
run: composer install
- name: PHPUnit check
run: ./vendor/bin/phpunit --coverage-text
- uses: actions/checkout@v2
- name: Setup PHP environment
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
coverage: xdebug
- name: Install dependencies
run: composer install
- name: PHPUnit check
run: ./vendor/bin/phpunit --coverage-text
129 changes: 65 additions & 64 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,69 @@
{
"name": "overtrue/laravel-follow",
"description": "User follow unfollow system for Laravel.",
"license": "MIT",
"authors": [
{
"name": "overtrue",
"email": "[email protected]"
}
],
"require": {
"laravel/framework": "^8.0"
},
"autoload": {
"psr-4": {
"Overtrue\\LaravelFollow\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests"
}
},
"require-dev": {
"mockery/mockery": "^1.2",
"phpunit/phpunit": "^9.0",
"orchestra/testbench": "^6.0",
"brainmaestro/composer-git-hooks": "^2.7",
"friendsofphp/php-cs-fixer": "^3.0"
},
"extra": {
"laravel": {
"providers": ["Overtrue\\LaravelFollow\\FollowServiceProvider"]
},
"hooks": {
"pre-commit": [
"composer fix-style",
"composer test"
],
"pre-push": [
"composer test",
"composer check-style"
]
}
},
"scripts": {
"post-update-cmd": [
"cghooks remove",
"cghooks add --ignore-lock",
"cghooks update"
],
"post-merge": "composer install",
"post-install-cmd": [
"cghooks remove",
"cghooks add --ignore-lock",
"cghooks update"
],
"cghooks": "vendor/bin/cghooks",
"check-style": "php-cs-fixer fix --using-cache=no --diff --dry-run --ansi",
"fix-style": "php-cs-fixer fix --using-cache=no --ansi",
"test": "phpunit --colors=always"
"name": "overtrue/laravel-follow",
"description": "User follow unfollow system for Laravel.",
"license": "MIT",
"authors": [
{
"name": "overtrue",
"email": "[email protected]"
}
],
"require": {
"laravel/framework": "^9.0"
},
"autoload": {
"psr-4": {
"Overtrue\\LaravelFollow\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests"
}
},
"require-dev": {
"mockery/mockery": "^1.4",
"phpunit/phpunit": "^9.5",
"orchestra/testbench": "^7.0",
"friendsofphp/php-cs-fixer": "^3.0"
},
"extra": {
"laravel": {
"providers": [
"Overtrue\\LaravelFollow\\FollowServiceProvider"
]
},
"scripts-descriptions": {
"test": "Run all tests.",
"check-style": "Run style checks (only dry run - no fixing!).",
"fix-style": "Run style checks and fix violations."
"hooks": {
"pre-commit": [
"composer fix-style",
"composer test"
],
"pre-push": [
"composer test",
"composer check-style"
]
}
},
"scripts": {
"post-update-cmd": [
"cghooks remove",
"cghooks add --ignore-lock",
"cghooks update"
],
"post-merge": "composer install",
"post-install-cmd": [
"cghooks remove",
"cghooks add --ignore-lock",
"cghooks update"
],
"cghooks": "vendor/bin/cghooks",
"check-style": "php-cs-fixer fix --using-cache=no --diff --dry-run --ansi",
"fix-style": "php-cs-fixer fix --using-cache=no --ansi",
"test": "phpunit --colors=always"
},
"scripts-descriptions": {
"test": "Run all tests.",
"check-style": "Run style checks (only dry run - no fixing!).",
"fix-style": "Run style checks and fix violations."
}
}

0 comments on commit 3b344cf

Please sign in to comment.