Skip to content

Commit

Permalink
Bump packages and add some workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnabil230 committed Jun 3, 2023
1 parent ceebac9 commit 9ba70c8
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 34 deletions.
66 changes: 66 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Bug Report
description: Report an Issue or Bug with the Package
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
We're sorry to hear you have a problem. Can you help us solve it by providing the following details.
- type: textarea
id: what-happened
attributes:
label: What happened?
description: What did you expect to happen?
placeholder: I cannot currently do X thing because when I do, it breaks X thing.
validations:
required: true
- type: textarea
id: how-to-reproduce
attributes:
label: How to reproduce the bug
description: How did this occur, please add any config values used and provide a set of reliable steps if possible.
placeholder: When I do X I see Y.
validations:
required: true
- type: input
id: package-version
attributes:
label: Package Version
description: What version of our Package are you running? Please be as specific as possible
placeholder: 2.0.0
validations:
required: true
- type: input
id: php-version
attributes:
label: PHP Version
description: What version of PHP are you running? Please be as specific as possible
placeholder: 8.2.0
validations:
required: true
- type: input
id: laravel-version
attributes:
label: Laravel Version
description: What version of Laravel are you running? Please be as specific as possible
placeholder: 9.0.0
validations:
required: true
- type: dropdown
id: operating-systems
attributes:
label: Which operating systems does with happen with?
description: You may select more than one.
multiple: true
options:
- macOS
- Windows
- Linux
- type: textarea
id: notes
attributes:
label: Notes
description: Use this field to provide any other notes that you feel might be relevant to the issue.
validations:
required: false
5 changes: 1 addition & 4 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ contact_links:
about: Share ideas for new features
- name: Report a security issue
url: https://github.com/MichaelNabil230/laravel-block-ip/security/policy
about: Learn how to notify us for sensitive bugs
- name: Report a bug
url: https://github.com/MichaelNabil230/laravel-block-ip/issues/new
about: Report a reproducible bug
about: Learn how to notify us for sensitive bugs
5 changes: 2 additions & 3 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:

- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Auto-merge Dependabot PRs for semver-minor updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Auto-merge Dependabot PRs for semver-patch updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Fix PHP code style issues

on: [push]
on:
push:
paths:
- "**.php"

permissions:
contents: write

jobs:
php-code-styling:
Expand All @@ -13,7 +19,7 @@ jobs:
ref: ${{ github.head_ref }}

- name: Fix PHP code style issues
uses: aglipanci/laravel-pint-action@2.3.0
uses: aglipanci/laravel-pint-action@2.2.0

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: PHPStan
on:
push:
paths:
- '**.php'
- 'phpstan.neon.dist'
- "**.php"
- "phpstan.neon.dist"

jobs:
phpstan:
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: "8.1"
coverage: none

- name: Install composer dependencies
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.2, 8.1]
laravel: [9.*]
laravel: [10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 8.*
carbon: ^2.63

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

Expand All @@ -40,11 +41,11 @@ jobs:
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: List Installed Dependencies
run: composer show -D

- name: Execute tests
run: vendor/bin/pest
run: vendor/bin/pest --ci
3 changes: 3 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
release:
types: [released]

permissions:
contents: write

jobs:
update:
runs-on: ubuntu-latest
Expand Down
35 changes: 18 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,32 @@
],
"require": {
"php": "^8.1",
"illuminate/contracts": "^9.0",
"spatie/laravel-package-tools": "^1.13.0"
"spatie/laravel-package-tools": "^1.15.0",
"illuminate/contracts": "^10.0"
},
"require-dev": {
"laravel/pint": "^1.0",
"laravel/slack-notification-channel": "^2.4",
"nunomaduro/collision": "^6.0",
"nunomaduro/larastan": "^2.0.1",
"orchestra/testbench": "^7.0",
"pestphp/pest": "^1.21",
"pestphp/pest-plugin-laravel": "^1.1",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5"
"laravel/pint": "^1.10",
"laravel/slack-notification-channel": "^2.5",
"nunomaduro/collision": "^7",
"nunomaduro/larastan": "^2.6.0",
"orchestra/testbench": "^8.5.5",
"pestphp/pest": "^2.6.2",
"pestphp/pest-plugin-arch": "^2.2",
"pestphp/pest-plugin-laravel": "^2.0.0",
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan-deprecation-rules": "^1.1.3",
"phpstan/phpstan-phpunit": "^1.3.13",
"phpunit/phpunit": "^10.2"
},
"autoload": {
"psr-4": {
"MichaelNabil230\\BlockIp\\": "src",
"MichaelNabil230\\BlockIp\\Database\\Factories\\": "database/factories"
"MichaelNabil230\\BlockIp\\": "src/",
"MichaelNabil230\\BlockIp\\Database\\Factories\\": "database/factories/"
}
},
"autoload-dev": {
"psr-4": {
"MichaelNabil230\\BlockIp\\Tests\\": "tests"
"MichaelNabil230\\BlockIp\\Tests\\": "tests/"
}
},
"scripts": {
Expand All @@ -67,4 +68,4 @@
},
"minimum-stability": "dev",
"prefer-stable": true
}
}

0 comments on commit 9ba70c8

Please sign in to comment.