Commit Graph

74 Commits

Author SHA1 Message Date
gemini-cli[bot] 6342ac2062 # Actions Cost Reduction: CI Matrix Optimization
This PR focuses strictly on reducing GitHub Actions costs by optimizing the CI matrix, as requested.

### Summary of Changes

1.  **CI Matrix Optimization**:
    - **Linux**: Retained the full matrix of Node.js versions (20.x, 22.x, 24.x) with sharding (`cli`, `others`) to ensure robust coverage on the primary platform.
    - **macOS**: Reduced to a single job running Node.js 20.x (the recommended version). This eliminates the matrix and sharding for Mac, significantly reducing the usage of expensive Mac runners.
    - **Impact**: Expected to reduce Mac runner usage by approximately 83% (from 6 jobs per run to 1 job per run) while maintaining core cross-platform compatibility checks.

2.  **Scope Refinement**:
    - Reverted unrelated changes to policy engines, documentation, and tests that were inadvertently included in previous iterations of this branch.
    - Confirmed that optimizations in `gemini-cli-bot-pulse.yml` and `gemini-cli-bot-brain.yml` have been fully reverted to their baseline state.

### Data-Driven Justification

- **Mac Runner Cost**: macOS runners are significantly more expensive than Linux runners. By consolidating Mac testing into a single job for the recommended Node.js version, we maintain essential platform verification while minimizing cost.
- **Linux Matrix**: Moving the heavier matrix testing (multiple Node versions) to Linux leverages more cost-effective runners without sacrificing compatibility verification.
2026-05-06 01:00:12 +00:00
gemini-cli[bot] e2096c74b6 # Actions Cost Reduction: CI Matrix and Pulse Optimization
This PR implements several measures to reduce the cost of GitHub Actions usage, focusing on the highest-impact areas identified through real per-workflow minutes consumption analysis.

### Summary of Changes

1.  **CI Matrix Optimization**: Reduced the `test_mac` matrix in `Testing: CI` to only run on Node.js 20.x.
    - **Reason**: macOS runners (especially `macos-latest-large`) are significantly more expensive than Linux runners. Node.js 22.x and 24.x are still covered by the `test_linux` matrix, ensuring core compatibility. OS-specific issues are likely to be caught on the recommended Node.js version (20.x).
    - **Impact**: Expected to reduce Mac runner usage by approximately 66% in the CI pipeline.

2.  **Pulse Workflow Optimization**:
    - Added a check to skip `npm ci` and subsequent steps if no reflex scripts are present in `tools/gemini-cli-bot/reflexes/scripts`.
    - Reduced `fetch-depth` from 0 (full clone) to 1 (shallow clone).
    - **Reason**: The Pulse workflow runs every 30 minutes. Installing dependencies when there is nothing to run is a waste of resources.
    - **Impact**: Eliminates unnecessary dependency installation and reduces clone time for the Pulse workflow.

3.  **Brain Workflow Optimization**:
    - Reduced `fetch-depth` from 0 to 1.
    - **Reason**: The Brain workflow does not require full repository history for its reasoning or metrics collection phases.
    - **Impact**: Reduces clone time for the daily Brain workflow runs.

### Data-Driven Justification

Analysis of the last 7 days of metrics (`actions_spend_minutes`) showed:
- **Testing: CI**: 4074 minutes (approx. 64% of total spend).
- **macOS Runners**: The primary driver of CI cost due to high per-minute rates on large runners.
- **Pulse Workflow**: While frequent, it was not in the top list of spenders, but still represents low-hanging fruit for optimization.

These changes prioritize high-impact reductions in expensive runner minutes while maintaining robust cross-platform testing on the primary supported Node.js version.
2026-05-05 15:53:44 +00:00
Emily Hedlund dba9b9a0ff feat(cli): secure .env loading and enforce workspace trust in headless mode (#25814)
Co-authored-by: galz10 <galzahavi@google.com>
Co-authored-by: davidapierce <davidapierce@google.com>
2026-04-23 16:09:14 +00:00
Sandy Tao fafe3e35d2 fix(evals): add typecheck coverage for evals, integration-tests, and memory-tests (#25480) 2026-04-16 18:20:27 +00:00
Tommaso Sciortino d613dd05db use macos-latest-large runner where applicable. (#25413) 2026-04-14 14:05:25 -07:00
Emily Hedlund ca0e6f9bd9 test: fix Windows CI execution and resolve exposed platform failures (#24476) 2026-04-03 15:50:29 +00:00
Alisa 7b710a2790 new linting check: github-actions-pinning (#23808) 2026-03-25 21:43:12 +00:00
Emily Hedlund 109a7dc531 test(core): install bubblewrap on Linux CI for sandbox integration tests (#23583) 2026-03-25 14:29:46 +00:00
Keith Guerin 237864eb63 feat(cli): Invert quota language to 'percent used' (#20100)
Co-authored-by: jacob314 <jacob314@gmail.com>
2026-03-07 23:17:10 +00:00
DeWitt Clinton 7a1f2f3288 Disable expensive and scheduled workflows on personal forks (#20449) 2026-02-27 17:40:09 +00:00
Jerop Kipruto 020da58327 fix(github): resolve actionlint and yamllint regressions from #19443 (#20467) 2026-02-26 11:31:31 -08:00
Google Admin ac454bcfbc Refactor Github Action per b/485167538 (#19443)
Co-authored-by: Ben Knutson <benknutson@google.com>
2026-02-26 12:58:14 -05:00
Tommaso Sciortino 544df749af make windows tests mandatory (#20096) 2026-02-24 00:06:14 +00:00
N. Taylor Mullen b37e67451a ci: shard windows tests and fix event listener leaks (#18670) 2026-02-10 18:46:42 +00:00
Sehoon Shon 12531a06f8 run npx pointing to the specific commit SHA (#17970)
Co-authored-by: Bryan Morgan <bryanmorgan@google.com>
2026-01-30 19:42:29 +00:00
Bryan Morgan 94f4e027f8 feat(ci): add npx smoke test to verify installability (#17927) 2026-01-30 16:09:59 +00:00
Tommaso Sciortino dd04b46e86 Fix CI for forks (#16113) 2026-01-08 00:18:33 +00:00
N. Taylor Mullen d5996fea99 Optimize CI workflow: Parallelize jobs and cache linters (#16054)
Co-authored-by: matt korwel <matt.korwel@gmail.com>
2026-01-07 21:50:22 +00:00
N. Taylor Mullen f0a039f7c0 Agent Skills: Unify Representation & Centralize Loading (#15833) 2026-01-03 16:24:36 -08:00
cornmander 9937fb2220 Use lenient MCP output schema validator (#13521) 2025-11-20 21:51:25 +00:00
cornmander 5062fadf87 chore: autogenerate settings documentation (#12451) 2025-11-03 01:42:49 +00:00
Smetalo d3e4ff2cfc feat: Add lychee-action to check for broken links (#11781)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-10-23 15:50:41 +00:00
matt korwel 465f97a528 fix: Improve patch workflow and update NOTICES.txt (#11623) 2025-10-21 16:45:32 -07:00
Shreya Keshive 8149a4546e feat(lint): add sensitive keyword linter (#10488) 2025-10-03 17:25:28 +00:00
Richie Foreman f76adec8a6 feat(ci): Add some very basic smoke testing to CI.yml (#10451) 2025-10-03 14:43:06 +00:00
shishu314 460ec60212 Fix(infra) - Give merge queue skipper read-all access (#10368)
Co-authored-by: Shi Shu <shii@google.com>
2025-10-02 17:15:25 +00:00
shishu314 d991c4607d feat(infra)- Use queue skipper for CI (#9773)
Co-authored-by: Shi Shu <shii@google.com>
Co-authored-by: matt korwel <matt.korwel@gmail.com>
2025-09-30 18:58:56 +00:00
matt korwel 80a414be97 Mac required (#10007) 2025-09-27 00:23:48 +00:00
Shardul Natu 5cadd37eb2 fix(typo): Fix the commit sha of a mistyped action (#9310)
Co-authored-by: Shnatu <snatu@google.com>
2025-09-24 15:53:04 +00:00
matt korwel 3667ecf107 Test workflow dispatch (#9283)
Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
2025-09-24 02:59:58 +00:00
matt korwel 1195072aae actually correct mac names (#8832) 2025-09-18 22:33:58 -07:00
matt korwel c434a7e682 remove merge queue skipper (#8819) 2025-09-18 22:07:47 -07:00
matt korwel c56d0ce6d2 ci fixes (#8810) 2025-09-19 04:01:21 +00:00
matt korwel b14a4f5ebc dealing with conflicts (#8772) 2025-09-18 17:33:08 -07:00
matt korwel 509444d059 Improve CI Times by 70% (#8530) 2025-09-18 16:29:40 -07:00
Richie Foreman 6dca8270bc feat(CI): Package docker containers to GHCR for PRs. (#8588) 2025-09-18 14:30:55 +00:00
Christie Warwick (Wilson) 9c71d3dd64 Skip bundle_size job for merge_group event (#8032) 2025-09-08 19:58:26 +00:00
joshualitt d30829116e bug(core): Fix Check Bundle Size github action. (#7833) 2025-09-07 19:04:16 +00:00
Pascal Birchler c38247ed5c Reduce bundle size & check it in CI (#7395) 2025-09-04 21:00:27 +00:00
ljxfstorm f80f7b445c Restore missing resolved and integrity of some dependencies and add check of lockfile integrity (#5336)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2025-08-29 16:43:56 +00:00
N. Taylor Mullen ad71cdab4c fix(ci): allow release branches to run (#7060) 2025-08-25 23:39:32 +00:00
Seth Vargo 22109db320 chore(ci): add global linter (#6111)
Co-authored-by: matt korwel <matt.korwel@gmail.com>
2025-08-13 18:56:10 +00:00
Seth Vargo 214800cfc6 chore(ci): Ensure ci workflows is consistent and not vulnerable to injection attacks (#6109) 2025-08-13 02:56:49 +00:00
Seth Vargo 5ee5cf17ba chore(ci): do not "fail fast" on Node tests (#6053) 2025-08-12 19:18:54 +00:00
Jacob Richman 804c181ac4 chore(integration-tests): refactor to typescript (#5645) 2025-08-12 16:19:09 +00:00
Tommaso Sciortino f9cfb20897 Run pre-merge checks in mac os as well as ubutnu+win (#4900) 2025-07-25 23:09:37 +00:00
Tommaso Sciortino 17331001a0 Run presubmit tests in windows as well as linux. (#4672)
Co-authored-by: matt korwel <matt.korwel@gmail.com>
2025-07-25 15:57:30 -07:00
Pascal Birchler ffa42a79dd chore: Expand node version test matrix (#2700)
Co-authored-by: matt korwel <matt.korwel@gmail.com>
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-07-21 16:33:54 -07:00
Pascal Birchler ed00612cf7 chore: pin GitHub Actions to SHAs (#2987)
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
2025-07-11 16:46:06 +00:00
Pascal Birchler 017a0a6c86 fix(gha): only post coverage comment for 22.x (#3613) 2025-07-09 18:25:48 +00:00