Skip to content

Install mosquitto and ccache through the cached apt action - #2586

Merged
bdraco merged 2 commits into
mainfrom
cache-apt-installs
Aug 18, 2026
Merged

Install mosquitto and ccache through the cached apt action#2586
bdraco merged 2 commits into
mainfrom
cache-apt-installs

Conversation

@bdraco

@bdraco bdraco commented Aug 18, 2026

Copy link
Copy Markdown
Member

What does this implement/fix?

The E2E MQTT job on #2585 spun for an hour inside apt-get update, retrying the Azure apt mirror until the run was cancelled. Install mosquitto and ccache through awalsh128/cache-apt-pkgs-action instead, the same pattern esphome CI uses; a cache hit restores the packages without running apt-get update at all, so a mirror outage can't hang the job, and a 10 minute step timeout bounds the cold cache path. The cache is seeded by push-to-main runs, so PR runs share it.

Related issue or feature (if applicable):

  • N/A

Types of changes

  • Bugfix (non-breaking change which fixes an issue) — bugfix
  • New feature (non-breaking change which adds functionality) — new-feature
  • Enhancement to an existing feature — enhancement
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) — breaking-change
  • Refactor (no behaviour change) — refactor
  • Documentation only — docs
  • Maintenance / chore — maintenance
  • CI / workflow change — ci
  • Dependencies bump — dependencies

Frontend coordination

  • No frontend change needed
  • Companion frontend PR: esphome/device-builder-frontend#

Checklist

  • The code change is tested and works locally.
  • Pre-commit hooks pass (ruff, codespell, yaml/json/python checks).
  • Tests have been added or updated under tests/ where applicable.
  • components.index.json / definitions/components/*.json have not been hand-edited (regenerate via script/sync_components.py if a sync is needed).
  • Architecture-level changes are reflected in docs/ARCHITECTURE.md and/or docs/API.md.

@github-actions github-actions Bot added the ci Continuous integration / build / release tooling label Aug 18, 2026
@codspeed-hq

codspeed-hq Bot commented Aug 18, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 28 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing cache-apt-installs (9e40490) with main (7681744)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

@bdraco
bdraco marked this pull request as ready for review August 18, 2026 05:04
Copilot AI lite review requested due to automatic review settings August 18, 2026 05:04
@bdraco
bdraco enabled auto-merge (squash) August 18, 2026 05:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the CI workflow to install mosquitto and ccache via awalsh128/cache-apt-pkgs-action, reducing exposure to flaky apt mirrors (by avoiding apt-get update on cache hits) and bounding cold-cache installs with a step timeout.

Changes:

  • Replace direct apt-get update && apt-get install usage for mosquitto with a cached apt-packages action step (with a 10-minute timeout).
  • Replace direct apt-based ccache install with the same cached apt-packages action step (with a 10-minute timeout).
Suppressed comments (1)

.github/workflows/test.yml:484

  • Same as above: quote with.version so it remains a stable, exact string and doesn't get normalized by YAML/JSON parsing.
        with:
          packages: ccache
          version: 1.0

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/test.yml
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.72%. Comparing base (7681744) to head (9e40490).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2586   +/-   ##
=======================================
  Coverage   99.72%   99.72%           
=======================================
  Files         274      274           
  Lines       23074    23074           
=======================================
  Hits        23010    23010           
  Misses         64       64           
Flag Coverage Δ
py3.12 99.68% <ø> (ø)
py3.14 99.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bdraco
bdraco merged commit beb785e into main Aug 18, 2026
23 checks passed
@bdraco
bdraco deleted the cache-apt-installs branch August 18, 2026 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration / build / release tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants