mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
gha: use separate workflow file only on push for fixing the code style (#1013)
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
name: Fix Code Style
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
fix-style:
|
||||
name: Fix Code Style
|
||||
timeout-minutes: 15
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
COMPOSER_NO_INTERACTION: 1
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 7.4
|
||||
coverage: none
|
||||
tools: composer:v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
composer remove phpro/grumphp vimeo/psalm --no-update --dev
|
||||
composer update --prefer-dist --no-progress
|
||||
|
||||
- run: composer fix-style
|
||||
continue-on-error: true
|
||||
|
||||
# Revert manual modifications so they don't get commited 💥
|
||||
- run: git checkout -- composer.json
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: composer fix-style
|
||||
commit_author: laravel-ide-helper <[email protected]>
|
||||
@@ -38,37 +38,3 @@ jobs:
|
||||
|
||||
- name: Execute Unit Tests
|
||||
run: composer test
|
||||
|
||||
fix-style:
|
||||
name: Fix Code Style
|
||||
timeout-minutes: 15
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
COMPOSER_NO_INTERACTION: 1
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 7.4
|
||||
coverage: none
|
||||
tools: composer:v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
composer remove phpro/grumphp vimeo/psalm --no-update --dev
|
||||
composer update --prefer-dist --no-suggest --no-progress
|
||||
|
||||
- run: composer fix-style
|
||||
continue-on-error: true
|
||||
|
||||
# Revert modifications so they don't get commited 💥
|
||||
- run: git checkout -- composer.json
|
||||
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: composer fix-style
|
||||
commit_author: laravel-ide-helper <[email protected]>
|
||||
|
||||
Reference in New Issue
Block a user