mirror of
https://github.com/filamentphp/plugin-skeleton.git
synced 2025-12-06 13:38:53 +08:00
update workflows with pint and recent spatie updates
This commit is contained in:
8
.github/workflows/dependabot-auto-merge.yml
vendored
8
.github/workflows/dependabot-auto-merge.yml
vendored
@@ -10,23 +10,23 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||
steps:
|
||||
|
||||
|
||||
- name: Dependabot metadata
|
||||
id: metadata
|
||||
uses: dependabot/fetch-metadata@v1.3.3
|
||||
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"
|
||||
env:
|
||||
PR_URL: ${{github.event.pull_request.html_url}}
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
21
.github/workflows/fix-php-code-style-issues.yml
vendored
Normal file
21
.github/workflows/fix-php-code-style-issues.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Fix PHP code style issues
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
php-code-styling:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Fix PHP code style issues
|
||||
uses: aglipanci/laravel-pint-action@1.0.0
|
||||
|
||||
- name: Commit changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: Fix styling
|
||||
6
.github/workflows/phpstan.yml
vendored
6
.github/workflows/phpstan.yml
vendored
@@ -11,16 +11,16 @@ jobs:
|
||||
name: phpstan
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.0'
|
||||
php-version: '8.1'
|
||||
coverage: none
|
||||
|
||||
- name: Install composer dependencies
|
||||
uses: ramsey/composer-install@v1
|
||||
|
||||
- name: Run PHPStan
|
||||
run: ./vendor/bin/phpstan --error-format=github
|
||||
run: ./vendor/bin/phpstan --error-format=github
|
||||
27
.github/workflows/pint.yml
vendored
27
.github/workflows/pint.yml
vendored
@@ -1,27 +0,0 @@
|
||||
name: pint
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
pint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v2
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
composer install --no-interaction
|
||||
npm ci
|
||||
- name: Run Pint
|
||||
run: composer pint
|
||||
- name: Run Prettier
|
||||
run: npm run prettier
|
||||
- name: Commit changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: >
|
||||
chore: fix code style
|
||||
8
.github/workflows/run-tests.yml
vendored
8
.github/workflows/run-tests.yml
vendored
@@ -13,18 +13,18 @@ jobs:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
php: [8.0, 8.1]
|
||||
php: [8.1]
|
||||
laravel: [9.*]
|
||||
stability: [prefer-lowest, prefer-stable]
|
||||
include:
|
||||
- laravel: 9.*
|
||||
testbench: ^7.0
|
||||
testbench: 7.*
|
||||
|
||||
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
@@ -44,4 +44,4 @@ jobs:
|
||||
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
|
||||
|
||||
- name: Execute tests
|
||||
run: vendor/bin/pest
|
||||
run: vendor/bin/pest
|
||||
4
.github/workflows/update-changelog.yml
vendored
4
.github/workflows/update-changelog.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: main
|
||||
|
||||
@@ -25,4 +25,4 @@ jobs:
|
||||
with:
|
||||
branch: main
|
||||
commit_message: Update CHANGELOG
|
||||
file_pattern: CHANGELOG.md
|
||||
file_pattern: CHANGELOG.md
|
||||
@@ -48,9 +48,9 @@
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"pint": "pint",
|
||||
"test:pest": "pest --parallel",
|
||||
"test:phpstan": "phpstan analyse",
|
||||
"pint": "vendor/bin/pint",
|
||||
"test:pest": "vendor/bin/pest --parallel",
|
||||
"test:phpstan": "vendor/bin/phpstan analyse",
|
||||
"test": [
|
||||
"@test:pest",
|
||||
"@test:phpstan"
|
||||
|
||||
Reference in New Issue
Block a user