diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4697bea8..5dd58930 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,14 +1,25 @@ name: CI -on: push +on: + push: + branches: [ main ] + pull_request: + jobs: - build: + lint: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v7 - - name: Checking PHP syntax error - uses: overtrue/phplint@9.8 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 with: - path: . - options: --exclude=*.log + php-version: '8.4' + coverage: none + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-interaction + + - name: Checking PHP syntax error + run: composer run-script lint diff --git a/composer.json b/composer.json index d13b09c4..4c3228e3 100644 --- a/composer.json +++ b/composer.json @@ -52,6 +52,6 @@ }, "scripts": { "test": "phpunit", - "lint": "phplint" + "lint": "phplint src tests rector.php" } }