Conversation
|
Merging to
|
- sync.yml: expand cache-dependency-path to include both requirements.txt and pyproject.toml (previously only requirements.txt was covered) - bandit.yml: add explicit actions/cache@v4 step keyed on both files with runner.os-pip- restore-keys fallback - Fix outdated comment in sync.yml to reference both dependency files Co-authored-by: abhimehro <84992105+abhimehro@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add CI dependency caching for Python in workflows
feat: broaden pip cache keys to cover pyproject.toml and add caching to bandit workflow
Feb 20, 2026
|
👋 Development Partner is reviewing this PR. Will provide feedback shortly. |
There was a problem hiding this comment.
Pull request overview
This PR adds pip dependency caching to CI workflows to reduce execution time by avoiding redundant package downloads. The caching strategy correctly includes both requirements.txt and pyproject.toml in cache keys, since pyproject.toml is the source of truth for dependencies.
Changes:
- Expanded
sync.ymlcache key fromrequirements.txtonly to include bothrequirements.txtandpyproject.toml - Added explicit pip caching to
bandit.ymlusingactions/cache@v4with the same dual-file hash strategy - Updated comments in both workflows to document the caching approach
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/sync.yml |
Broadened cache-dependency-path to include both dependency files and updated comments |
.github/workflows/bandit.yml |
Added new pip cache step before the Bandit scan with dual-file hash keys |
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.
CI workflows were reinstalling Python dependencies from scratch on every run.
sync.ymlhad partial caching (only keyed onrequirements.txt);bandit.ymlhad none.Changes
sync.ymlcache-dependency-pathfromrequirements.txtalone to bothrequirements.txtandpyproject.toml, so cache invalidation tracks the actual source of truth for dependenciesbandit.ymlactions/cache@v4step before the bandit scan, keyed on the same dual-file hash with anos-scoped restore-key fallback, so partial cache hits are used after dep updatesperformance.ymlwas already covered viaastral-sh/setup-uv@v4withenable-cache: trueand required no changes.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.