Improve CI: PR tests only affected features, 60-min timeout, least-privilege token#147
Merged
Improve CI: PR tests only affected features, 60-min timeout, least-privilege token#147
Conversation
…eout, least-privilege permissions Co-authored-by: sebst <592313+sebst@users.noreply.github.com> Agent-Logs-Url: https://github.com/devcontainer-community/devcontainer-features/sessions/cce341b7-4c9d-4fd6-8cce-cc5c56573b13
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-featuresjob: New preflight job that drives the test matrix dynamically.pull_request: diffsorigin/<base>...HEAD, extracts changedsrc/andtest/subdirectory names, outputs them as a JSON array.push/workflow_dispatch: scansls src/at runtime — no hardcoded feature list to drift out of sync.features(JSON array) andhas-features(boolean) outputs.Dynamic matrix for
test-autogeneratedandtest-scenarios: Both jobs nowneeds: get-changed-featuresand usefromJson(needs.get-changed-features.outputs.features)as their matrix. Jobs are skipped entirely whenhas-featuresis false (e.g., workflow-only or docs PRs).timeout-minutes: 60added to all three test jobs (test-autogenerated,test-scenarios,test-global).permissions: contents: readadded at the workflow level — restrictsGITHUB_TOKENto the minimum required scope.Original prompt
⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.