]> BookStack Code Mirror - bookstack/commitdiff
Added php lint gh action, updated composer scripts
authorDan Brown <redacted>
Sun, 18 Sep 2022 00:56:45 +0000 (01:56 +0100)
committerDan Brown <redacted>
Sun, 18 Sep 2022 00:56:45 +0000 (01:56 +0100)
.github/workflows/lint-php.yml [new file with mode: 0644]
composer.json

diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml
new file mode 100644 (file)
index 0000000..75d18b6
--- /dev/null
@@ -0,0 +1,19 @@
+name: lint-php
+
+on: [push, pull_request]
+
+jobs:
+  build:
+    if: ${{ github.ref != 'refs/heads/l10n_development' }}
+    runs-on: ubuntu-22.04
+    steps:
+    - uses: actions/checkout@v1
+
+    - name: Setup PHP
+      uses: shivammathur/setup-php@v2
+      with:
+        php-version: 8.1
+        tools: phpcs
+
+    - name: Run formatting check
+      run: composer lint
index 615723be9c9fbe2e09486e53c6b878a3a427143c..cdd9c629eccb6919def6a6b3fe87fc0e8de60fe3 100644 (file)
@@ -69,6 +69,9 @@
         }
     },
     "scripts": {
+        "format": "phpcbf",
+        "lint": "phpcs",
+        "test": "phpunit",
         "post-autoload-dump": [
             "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
             "@php artisan package:discover --ansi"