Optimize CI/CD workflows: add timeouts, reduce overhead, improve caching#231
Merged
Conversation
- Add 10-minute timeout to all workflow jobs for fast failure - Add ESLint dependency caching in linter workflow - Consolidate npm upgrade steps in publish workflow - Optimize dependabot config for zero-dependency package Co-authored-by: mobilemind <19366+mobilemind@users.noreply.github.com>
- Use stable cache key for ESLint dependencies - Remove unnecessary blank line in publish workflow Co-authored-by: mobilemind <19366+mobilemind@users.noreply.github.com>
- Cache npm's cache directory instead of node_modules - Use manual version in cache key for controlled invalidation - Always run install (fast with cached packages) - Add restore-keys for partial cache hits Co-authored-by: mobilemind <19366+mobilemind@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve CI/CD workflow for mobilemind/text2datauri
Optimize CI/CD workflows: add timeouts, reduce overhead, improve caching
Dec 24, 2025
mobilemind
requested changes
Dec 24, 2025
Owner
mobilemind
left a comment
There was a problem hiding this comment.
I prefer monthly checks as more conservative.
- Change interval from quarterly back to monthly per user feedback - Update comment to reflect monthly frequency - Keep open-pull-requests-limit at 2 for optimization Co-authored-by: mobilemind <19366+mobilemind@users.noreply.github.com>
Contributor
Author
Reverted to monthly checks in commit 764ce22. The interval is now back to monthly as originally configured. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR optimizes CI/CD workflows for a zero-dependency package by adding timeout limits, consolidating redundant workflow steps, and implementing caching strategies to reduce execution time.
Key Changes:
- Added 10-minute timeout limits to all workflow jobs (ci.yml, linter.yml, codeql-analysis.yml, publish.yml)
- Consolidated npm upgrade and verification steps in publish.yml into a single step
- Added Node.js setup and npm caching to linter.yml to speed up ESLint installation
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/ci.yml | Added 10-minute timeout to build job |
| .github/workflows/linter.yml | Added timeout, Node.js setup, and npm caching for ESLint dependencies |
| .github/workflows/codeql-analysis.yml | Added 10-minute timeout to analyze job |
| .github/workflows/publish.yml | Added timeout and consolidated npm upgrade/verification into single step |
| .github/dependabot.yml | Reduced npm open-pull-requests-limit from 5 to 2 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mobilemind
approved these changes
Dec 24, 2025
Owner
mobilemind
left a comment
There was a problem hiding this comment.
Looks good to me. Let's merge it.
mobilemind
requested changes
Dec 24, 2025
- Change timeout from 10 to 15 minutes per user feedback - 50% increase provides better margin for CodeQL analysis Co-authored-by: mobilemind <19366+mobilemind@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Optimize CI/CD workflows for faster feedback cycles and reduced execution overhead in this zero-dependency package.
Changes
Timeout Limits
timeout-minutes: 10to CI, linter, and publish workflow jobs for fast failuretimeout-minutes: 15to CodeQL workflow job (increased to provide adequate time for security analysis)Workflow Optimizations
~/.npmdirectory to avoid re-downloading ESLint packages on every runeslint-v1) for controlled cache invalidationDependabot Configuration
Original prompt
This pull request was created from Copilot chat.
💡 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.