Skip to content

Commit

Permalink
Merge pull request #302 from wayofdev/docs/updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp authored Jun 7, 2024
2 parents 7586c9e + 44862b5 commit 92debd4
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ Our project employs [GitHub Actions](https://github.com/features/actions) for co
| [`coding-standards.yml`](workflows/coding-standards.yml) | Checks `yaml`, `md`, `composer`, `php` and commit coding standards. |
| [`create-release.yml`](workflows/create-release.yml) | Creates a release on GitHub. |
| [`dependency-analysis.yml`](workflows/dependency-analysis.yml) | Checks for dependency issues. |
| [`refactoring.yml`](workflows/refactoring.yml) | Runs rector/rector code check. |
| [`security-analysis.yml`](workflows/security-analysis.yml) | Checks for security issues. |
| [`shellcheck.yml`](workflows/shellcheck.yml) | Checks shell scripts. |
| [`static-analysis.yml`](workflows/static-analysis.yml) | Runs `psalm` and `phpstan` tools. |
Expand Down
Empty file removed .github/assets/.gitkeep
Empty file.
65 changes: 65 additions & 0 deletions .github/workflows/refactoring.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---

on: # yamllint disable-line rule:truthy
pull_request:
branches:
- master
paths:
- 'src/**'
- 'tests/**'
- '.php-cs-fixer.dist.php'
- 'rector.php'

name: ⚙️ Refactoring

jobs:
refactoring:
timeout-minutes: 4
runs-on: ${{ matrix.os }}
concurrency:
cancel-in-progress: true
group: refactoring-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
php-version:
- '8.1'
dependencies:
- locked
steps:
- name: 📦 Check out the codebase
uses: actions/[email protected]

- name: 🛠️ Setup PHP
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring
ini-values: error_reporting=E_ALL
coverage: none

- name: 🛠️ Setup problem matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- name: 🤖 Validate composer.json and composer.lock
run: composer validate --ansi --strict

- name: 🔍 Get composer cache directory
uses: wayofdev/gh-actions/actions/composer/[email protected]

- name: ♻️ Restore cached dependencies installed with composer
uses: actions/[email protected]
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-

- name: 📥 Install "${{ matrix.dependencies }}" dependencies
uses: wayofdev/gh-actions/actions/composer/[email protected]
with:
dependencies: ${{ matrix.dependencies }}

- name: ⚙️ Run automated refactoring with rector/rector
run: composer refactor:ci

0 comments on commit 92debd4

Please sign in to comment.