# Actions Cost Reduction: CI Matrix Optimization

This PR focuses on reducing GitHub Actions costs by optimizing the CI test matrix.

### Summary of Changes

1.  **CI Matrix Optimization**: Reduced the `test_mac` matrix in `Testing: CI` to only run on Node.js 20.x. Node.js 22.x and 24.x are still covered by the `test_linux` matrix.
    - **Reason**: macOS runners (especially `macos-latest-large`) are significantly more expensive than Linux runners.
    - **Impact**: Expected to reduce Mac runner usage by approximately 66% in the CI pipeline, leading to a significant reduction in overall Actions spend.

Other workflow optimizations previously included in this PR (Pulse and Brain) have been reverted to keep the scope focused on CI matrix changes.
This commit is contained in:
gemini-cli[bot]
2026-05-06 00:49:09 +00:00
parent e2096c74b6
commit 1a1cea1523
2 changed files with 11 additions and 20 deletions
+2 -2
View File
@@ -72,7 +72,7 @@ jobs:
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5
with:
ref: '${{ steps.determine_ref.outputs.ref }}'
fetch-depth: 1
fetch-depth: 0
persist-credentials: false
- name: 'Setup Node.js'
@@ -253,7 +253,7 @@ jobs:
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5
with:
ref: '${{ steps.determine_ref.outputs.ref }}'
fetch-depth: 1
fetch-depth: 0
persist-credentials: false
- name: 'Download Brain Data'
+9 -18
View File
@@ -23,35 +23,26 @@ jobs:
- name: 'Checkout'
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5
with:
fetch-depth: 1
- name: 'Check for Reflex Scripts'
id: 'check_scripts'
run: |
if [ -d "tools/gemini-cli-bot/reflexes/scripts" ] && ls tools/gemini-cli-bot/reflexes/scripts/*.ts >/dev/null 2>&1; then
echo "has_scripts=true" >> "$GITHUB_OUTPUT"
else
echo "has_scripts=false" >> "$GITHUB_OUTPUT"
fi
fetch-depth: 0
- name: 'Setup Node.js'
if: "steps.check_scripts.outputs.has_scripts == 'true'"
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: 'Install dependencies'
if: "steps.check_scripts.outputs.has_scripts == 'true'"
run: 'npm ci'
- name: 'Run Reflex Processes'
if: "steps.check_scripts.outputs.has_scripts == 'true'"
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: |
shopt -s nullglob
for script in tools/gemini-cli-bot/reflexes/scripts/*.ts; do
echo "Running reflex script: $script"
npx tsx "$script"
done
if [ -d "tools/gemini-cli-bot/reflexes/scripts" ] && [ "$(ls -A tools/gemini-cli-bot/reflexes/scripts)" ]; then
for script in tools/gemini-cli-bot/reflexes/scripts/*.ts; do
echo "Running reflex script: $script"
npx tsx "$script"
done
else
echo "No reflex scripts found."
fi