Skip to content

ci: add path filtering to static-code-analysis workflow#59319

Merged
nickvergessen merged 1 commit intomasterfrom
jtr/ci-perf-static-code-analysis-changes-check
Mar 31, 2026
Merged

ci: add path filtering to static-code-analysis workflow#59319
nickvergessen merged 1 commit intomasterfrom
jtr/ci-perf-static-code-analysis-changes-check

Conversation

@joshtrichards
Copy link
Copy Markdown
Member

@joshtrichards joshtrichards commented Mar 30, 2026

  • Resolves: #

Summary

All 5 Psalm jobs in the static-code-analysis workflow currently run unconditionally on every pull request, regardless of which files changed. This means JS-only, docs-only, or other non-PHP changes still trigger 5 full Psalm runs (each doing composer install + full static analysis).

This adds a changes job using dorny/paths-filter (matching the pattern already used by phpunit-*, lint-php, autocheckers, etc.) and gates all Psalm jobs behind it. A summary job is also added to ensure branch protection rules work correctly when jobs are skipped.

No changes to the actual Psalm analysis configuration or behavior -- only when it runs.

Benefit

With 5 jobs running in parallel, the wall-clock time is roughly one job's duration (~20–35 min), and the compute time is 5× that: ~100–175 minutes per workflow run. And less runners occupied.

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 34 milestone Mar 30, 2026
@joshtrichards joshtrichards requested a review from a team as a code owner March 30, 2026 17:01
@joshtrichards joshtrichards requested review from Altahrim, ArtificialOwl, icewind1991 and leftybournes and removed request for a team March 30, 2026 17:01
@nickvergessen nickvergessen enabled auto-merge March 30, 2026 17:28
@nickvergessen nickvergessen merged commit 810d8b4 into master Mar 31, 2026
214 of 221 checks passed
@nickvergessen nickvergessen deleted the jtr/ci-perf-static-code-analysis-changes-check branch March 31, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants