From ecbc7344fc3af00501cabb5405fd31f6b6c8c951 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sun, 18 Sep 2022 01:56:45 +0100 Subject: [PATCH] Added php lint gh action, updated composer scripts --- .github/workflows/lint-php.yml | 19 +++++++++++++++++++ composer.json | 3 +++ 2 files changed, 22 insertions(+) create mode 100644 .github/workflows/lint-php.yml diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml new file mode 100644 index 000000000..75d18b60d --- /dev/null +++ b/.github/workflows/lint-php.yml @@ -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 diff --git a/composer.json b/composer.json index 615723be9..cdd9c629e 100644 --- a/composer.json +++ b/composer.json @@ -69,6 +69,9 @@ } }, "scripts": { + "format": "phpcbf", + "lint": "phpcs", + "test": "phpunit", "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi"