Skip to content

Commit 92debd4

Browse files
authored
Merge pull request #302 from wayofdev/docs/updates
2 parents 7586c9e + 44862b5 commit 92debd4

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ Our project employs [GitHub Actions](https://github.com/features/actions) for co
171171
| [`coding-standards.yml`](workflows/coding-standards.yml) | Checks `yaml`, `md`, `composer`, `php` and commit coding standards. |
172172
| [`create-release.yml`](workflows/create-release.yml) | Creates a release on GitHub. |
173173
| [`dependency-analysis.yml`](workflows/dependency-analysis.yml) | Checks for dependency issues. |
174+
| [`refactoring.yml`](workflows/refactoring.yml) | Runs rector/rector code check. |
174175
| [`security-analysis.yml`](workflows/security-analysis.yml) | Checks for security issues. |
175176
| [`shellcheck.yml`](workflows/shellcheck.yml) | Checks shell scripts. |
176177
| [`static-analysis.yml`](workflows/static-analysis.yml) | Runs `psalm` and `phpstan` tools. |

.github/assets/.gitkeep

Whitespace-only changes.

.github/workflows/refactoring.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
branches:
6+
- master
7+
paths:
8+
- 'src/**'
9+
- 'tests/**'
10+
- '.php-cs-fixer.dist.php'
11+
- 'rector.php'
12+
13+
name: ⚙️ Refactoring
14+
15+
jobs:
16+
refactoring:
17+
timeout-minutes: 4
18+
runs-on: ${{ matrix.os }}
19+
concurrency:
20+
cancel-in-progress: true
21+
group: refactoring-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
22+
strategy:
23+
fail-fast: true
24+
matrix:
25+
os:
26+
- ubuntu-latest
27+
php-version:
28+
- '8.1'
29+
dependencies:
30+
- locked
31+
steps:
32+
- name: 📦 Check out the codebase
33+
uses: actions/checkout@v4.1.6
34+
35+
- name: 🛠️ Setup PHP
36+
uses: shivammathur/setup-php@2.30.5
37+
with:
38+
php-version: ${{ matrix.php-version }}
39+
extensions: mbstring
40+
ini-values: error_reporting=E_ALL
41+
coverage: none
42+
43+
- name: 🛠️ Setup problem matchers
44+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
45+
46+
- name: 🤖 Validate composer.json and composer.lock
47+
run: composer validate --ansi --strict
48+
49+
- name: 🔍 Get composer cache directory
50+
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
51+
52+
- name: ♻️ Restore cached dependencies installed with composer
53+
uses: actions/cache@v4.0.2
54+
with:
55+
path: ${{ env.COMPOSER_CACHE_DIR }}
56+
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
57+
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
58+
59+
- name: 📥 Install "${{ matrix.dependencies }}" dependencies
60+
uses: wayofdev/gh-actions/actions/composer/install@v3.1.0
61+
with:
62+
dependencies: ${{ matrix.dependencies }}
63+
64+
- name: ⚙️ Run automated refactoring with rector/rector
65+
run: composer refactor:ci

0 commit comments

Comments
 (0)