From f2f3ff59bee5114545b2c6aeb9404298a65bb18d Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Thu, 9 Apr 2026 15:15:08 +0100 Subject: [PATCH] ci: combine composer, format, and analyze jobs into single lint job Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 54 ++++++++-------------------------------- composer.json | 2 +- 2 files changed, 11 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2aeae21655..6362a79e01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,12 +83,14 @@ jobs: sarif_file: 'trivy-fs-results.sarif' category: 'trivy-source' - composer: - name: Checks / Composer + lint: + name: Checks / Lint runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v6 + with: + fetch-depth: 2 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -108,48 +110,6 @@ jobs: COMPOSER_NO_AUDIT: 0 run: composer audit - format: - name: Checks / Format - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v6 - with: - fetch-depth: 2 - - - run: git checkout HEAD^2 - if: github.event_name == 'pull_request' - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.3' - tools: composer:v2 - coverage: none - - - name: Install dependencies - run: composer install --prefer-dist --no-progress --ignore-platform-reqs - - - name: Run Linter - run: composer lint - - analyze: - name: Checks / Analyze - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v6 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.3' - tools: composer:v2 - coverage: none - - - name: Install dependencies - run: composer install --prefer-dist --no-progress --ignore-platform-reqs - - name: Cache PHPStan result cache uses: actions/cache@v4 with: @@ -161,6 +121,12 @@ jobs: - name: Run PHPStan run: composer analyze -- --no-progress + - run: git checkout HEAD^2 + if: github.event_name == 'pull_request' + + - name: Run Pint + run: composer format:check + specs: name: Checks / Specs runs-on: ubuntu-latest diff --git a/composer.json b/composer.json index 4ad1ae6120..acf34bbd7a 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ], "scripts": { "test": "vendor/bin/phpunit", - "lint": "vendor/bin/pint --test --config pint.json", + "format:check": "vendor/bin/pint --test --config pint.json", "format": "vendor/bin/pint --config pint.json", "analyze": "./vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=1G", "bench": "vendor/bin/phpbench run --report=benchmark",