From fd6092c7cfcc387a2a69a56d06f99ac745fbdcd9 Mon Sep 17 00:00:00 2001 From: Snider Date: Mon, 27 Apr 2026 16:04:23 +0100 Subject: [PATCH] ci(lint): pilot core-lint workflow alongside native PHPStan/Psalm jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds .github/workflows/lint-corelint.yml as a parity workflow for the core-lint orchestrator. Runs side-by-side with the existing static-analysis.yml jobs so PHPStan + Psalm output can be diffed between the native runners and the core-lint adapters across at least one merge cycle. The pilot is non-blocking (continue-on-error: true) — if core-lint fails the PR is not gated. Native jobs remain authoritative until parity is confirmed. Spec: plans/code/core/lint/RFC.md §5.4 (PHP adapter table), §7.2 (GitHub Actions integration) Co-Authored-By: Cladius Maximus --- .github/workflows/lint-corelint.yml | 59 +++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/lint-corelint.yml diff --git a/.github/workflows/lint-corelint.yml b/.github/workflows/lint-corelint.yml new file mode 100644 index 0000000..ceb3726 --- /dev/null +++ b/.github/workflows/lint-corelint.yml @@ -0,0 +1,59 @@ +name: core-lint pilot + +on: + push: + branches: [main, develop, dev] + pull_request: + branches: [main, develop, dev] + +# Pilot workflow that runs the core-lint orchestrator (PHPStan + Psalm via the +# code/core/lint adapters) ALONGSIDE the existing native phpstan/psalm jobs in +# .github/workflows/static-analysis.yml. Both must continue to run for at least +# one merge cycle so the parity between native and core-lint outputs can be +# diffed before native jobs are removed. +# +# Spec: plans/code/core/lint/RFC.md §5 (Adapter), §5.4 (Built-in Adapters) + +jobs: + core-lint: + name: core-lint (pilot) + runs-on: ubuntu-latest + continue-on-error: true # Pilot — failures here MUST NOT block PRs. + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite + coverage: none + + - name: Install PHP dependencies + run: composer install --prefer-dist --no-interaction --no-progress + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.26' + + - name: Install core-lint + run: | + go install dappco.re/go/lint/cmd/core-lint@latest || \ + go install github.com/dappcore/lint/cmd/core-lint@latest + echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" + + - name: Run core-lint (PHP, JSON for diffing) + run: | + core-lint run --lang php --ci --output json > core-lint-report.json || true + core-lint run --lang php --output text || true + + - name: Upload core-lint report + if: always() + uses: actions/upload-artifact@v4 + with: + name: core-lint-report + path: core-lint-report.json + if-no-files-found: ignore