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
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.actor == 'dependabot[bot]' }}
|
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Dependabot metadata
|
- name: Dependabot metadata
|
||||||
id: metadata
|
id: metadata
|
||||||
uses: dependabot/fetch-metadata@v1.3.3
|
uses: dependabot/fetch-metadata@v1.3.3
|
||||||
with:
|
with:
|
||||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
|
||||||
- name: Auto-merge Dependabot PRs for semver-minor updates
|
- name: Auto-merge Dependabot PRs for semver-minor updates
|
||||||
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
|
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
|
||||||
run: gh pr merge --auto --merge "$PR_URL"
|
run: gh pr merge --auto --merge "$PR_URL"
|
||||||
env:
|
env:
|
||||||
PR_URL: ${{github.event.pull_request.html_url}}
|
PR_URL: ${{github.event.pull_request.html_url}}
|
||||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
|
||||||
- name: Auto-merge Dependabot PRs for semver-patch updates
|
- name: Auto-merge Dependabot PRs for semver-patch updates
|
||||||
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
|
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
|
||||||
run: gh pr merge --auto --merge "$PR_URL"
|
run: gh pr merge --auto --merge "$PR_URL"
|
||||||
env:
|
env:
|
||||||
PR_URL: ${{github.event.pull_request.html_url}}
|
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
|
name: phpstan
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: '8.0'
|
php-version: '8.1'
|
||||||
coverage: none
|
coverage: none
|
||||||
|
|
||||||
- name: Install composer dependencies
|
- name: Install composer dependencies
|
||||||
uses: ramsey/composer-install@v1
|
uses: ramsey/composer-install@v1
|
||||||
|
|
||||||
- name: Run PHPStan
|
- 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
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest]
|
os: [ubuntu-latest, windows-latest]
|
||||||
php: [8.0, 8.1]
|
php: [8.1]
|
||||||
laravel: [9.*]
|
laravel: [9.*]
|
||||||
stability: [prefer-lowest, prefer-stable]
|
stability: [prefer-lowest, prefer-stable]
|
||||||
include:
|
include:
|
||||||
- laravel: 9.*
|
- laravel: 9.*
|
||||||
testbench: ^7.0
|
testbench: 7.*
|
||||||
|
|
||||||
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
|
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
@@ -44,4 +44,4 @@ jobs:
|
|||||||
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
|
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
|
||||||
|
|
||||||
- name: Execute tests
|
- 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:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: main
|
ref: main
|
||||||
|
|
||||||
@@ -25,4 +25,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
branch: main
|
branch: main
|
||||||
commit_message: Update CHANGELOG
|
commit_message: Update CHANGELOG
|
||||||
file_pattern: CHANGELOG.md
|
file_pattern: CHANGELOG.md
|
||||||
@@ -48,9 +48,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"pint": "pint",
|
"pint": "vendor/bin/pint",
|
||||||
"test:pest": "pest --parallel",
|
"test:pest": "vendor/bin/pest --parallel",
|
||||||
"test:phpstan": "phpstan analyse",
|
"test:phpstan": "vendor/bin/phpstan analyse",
|
||||||
"test": [
|
"test": [
|
||||||
"@test:pest",
|
"@test:pest",
|
||||||
"@test:phpstan"
|
"@test:phpstan"
|
||||||
|
|||||||
Reference in New Issue
Block a user