diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..e68bec8 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,28 @@ +name: Static Analysis + +on: [push] + +jobs: + ecs: + name: ECS + + runs-on: ubuntu-latest + strategy: + matrix: + dependency-version: [prefer-lowest, prefer-stable] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + coverage: none + + - name: Install Dependencies + run: composer update --prefer-stable --no-interaction --no-progress --ansi + + - name: Style + run: composer test:lint diff --git a/composer.json b/composer.json index e10ba9a..dead0c4 100644 --- a/composer.json +++ b/composer.json @@ -55,6 +55,8 @@ "sort-packages": true }, "scripts": { + "lint": "ecs --fix", + "test:lint": "ecs", "test:phpstan": "pest --testsuite phpstan", "test:rector": "pest --testsuite rector", "test:phpcsfixer": "pest --testsuite phpcsfixer",