Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/php-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: PHP Lint

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

jobs:
php-matrix:
name: PHP matrix
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.php-matrix.outputs.versions }}
steps:
- uses: actions/checkout@v5

- uses: typisttech/php-matrix-action@v3
id: php-matrix

php-lint:
name: PHP Lint (PHP ${{ matrix.php }})
needs: php-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ${{ fromJSON(needs.php-matrix.outputs.versions) }}
steps:
- uses: actions/checkout@v5

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer

- uses: ramsey/composer-install@v3

- run: composer lint
43 changes: 43 additions & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: PHPCS

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

jobs:
php-matrix:
name: PHP matrix
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.php-matrix.outputs.versions }}
steps:
- uses: actions/checkout@v5

- uses: typisttech/php-matrix-action@v3
id: php-matrix

phpcs:
name: PHPCS (PHP ${{ matrix.php }})
needs: php-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ${{ fromJSON(needs.php-matrix.outputs.versions) }}
steps:
- uses: actions/checkout@v5

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer

- uses: ramsey/composer-install@v3

- run: composer cs
43 changes: 43 additions & 0 deletions .github/workflows/phpstan.yml
Comment thread
YvesCesar marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: PHPStan

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

jobs:
php-matrix:
name: PHP matrix
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.php-matrix.outputs.versions }}
steps:
- uses: actions/checkout@v5

- uses: typisttech/php-matrix-action@v3
id: php-matrix

phpstan:
name: PHPStan (PHP ${{ matrix.php }})
needs: php-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ${{ fromJSON(needs.php-matrix.outputs.versions) }}
steps:
- uses: actions/checkout@v5

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer

- uses: ramsey/composer-install@v3

- run: composer stan
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/vendor/
35 changes: 35 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "libresign/libresign-wp-customizations",
"description": "WordPress customizations for libresign.coop",
"type": "wordpress-plugin",
"license": "GPL-2.0-or-later",
"require": {
"php": ">=8.3 <8.6"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"php-parallel-lint/php-parallel-lint": "^1.4",
"php-stubs/woocommerce-stubs": "^9.0",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"phpstan/phpstan": "^2.1",
"squizlabs/php_codesniffer": "^3.13",
"szepeviktor/phpstan-wordpress": "^2.0",
"wp-coding-standards/wpcs": "^3.2"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"scripts": {
"lint": "parallel-lint --exclude vendor .",
"cs": "phpcs",
"cs:fix": "phpcbf",
"stan": "phpstan analyse",
"ci": [
"@lint",
"@cs",
"@stan"
]
}
}
Loading
Loading