Skip to content

Improve CI: PR tests only affected features, 60-min timeout, least-privilege token#147

Merged
sebst merged 2 commits intomainfrom
copilot/improve-actions-workflow
Mar 21, 2026
Merged

Improve CI: PR tests only affected features, 60-min timeout, least-privilege token#147
sebst merged 2 commits intomainfrom
copilot/improve-actions-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 21, 2026

Every PR was triggering the full test matrix (all features × all base images), making CI slow and noisy. The full suite should only run on merges to main.

Changes

  • get-changed-features job: New preflight job that drives the test matrix dynamically.

    • On pull_request: diffs origin/<base>...HEAD, extracts changed src/ and test/ subdirectory names, outputs them as a JSON array.
    • On push/workflow_dispatch: scans ls src/ at runtime — no hardcoded feature list to drift out of sync.
    • Emits both features (JSON array) and has-features (boolean) outputs.
  • Dynamic matrix for test-autogenerated and test-scenarios: Both jobs now needs: get-changed-features and use fromJson(needs.get-changed-features.outputs.features) as their matrix. Jobs are skipped entirely when has-features is false (e.g., workflow-only or docs PRs).

  • timeout-minutes: 60 added to all three test jobs (test-autogenerated, test-scenarios, test-global).

  • permissions: contents: read added at the workflow level — restricts GITHUB_TOKEN to the minimum required scope.

Original prompt

This section details on the original issue you should resolve

<issue_title>Improve Actions workflow</issue_title>
<issue_description>Situation right now:

  • Full test suite runs on each Pull Request
  • Full tests suite runs on each merge to main
  • No timeout

Desired situation:

  • Pull Requests run ONLY the tests for the affected feature
  • Merge on main still runs the entire test suite
  • Entire test suite should have a timeout of 60mins runtime</issue_description>

Comments on the Issue (you are @copilot in this section)


⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.

@sebst sebst marked this pull request as ready for review March 21, 2026 18:04
Copilot AI changed the title [WIP] Update Actions workflow to optimize test runs Improve CI: PR tests only affected features, 60-min timeout, least-privilege token Mar 21, 2026
Copilot AI requested a review from sebst March 21, 2026 18:10
@sebst sebst merged commit ae264a9 into main Mar 21, 2026
5 checks passed
@sebst sebst deleted the copilot/improve-actions-workflow branch March 21, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Actions workflow

2 participants