summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsupahgreg <supahgreg@users.noreply.github.com>2025-10-04 21:15:25 +0000
committersupahgreg <supahgreg@users.noreply.github.com>2025-10-04 21:15:25 +0000
commit591ee81ad3c658da7982b27a272408074fe5af15 (patch)
tree854dce37fbbd486a364d8ee59c76105a979255da
parent4583ae8dc3e55d87000e1ecea23c89243bb3ce84 (diff)
Add a GitHub workflow for code quality (initially existing PHPStan).
-rw-r--r--.github/workflows/code-quality.yml40
1 files changed, 40 insertions, 0 deletions
diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml
new file mode 100644
index 000000000..8c5c0a623
--- /dev/null
+++ b/.github/workflows/code-quality.yml
@@ -0,0 +1,40 @@
+name: Code Quality
+
+on:
+ pull_request:
+ paths:
+ - '**.php'
+ - 'phpstan.neon'
+ push:
+ branches:
+ - main
+ paths:
+ - '**.php'
+ - 'phpstan.neon'
+ # Allow manual triggering
+ workflow_dispatch:
+
+env:
+ fail-fast: true
+
+permissions:
+ contents: read
+
+jobs:
+ static-analysis:
+ name: PHPStan
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v5
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: '8.4'
+ coverage: none
+ tools: none
+
+ - name: Run PHPStan
+ run: vendor/bin/phpstan analyze --no-progress