aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-05 09:37:12 -0500
committerCraig Jennings <c@cjennings.net>2026-05-05 09:37:12 -0500
commitb83865a65eb744f6d36c1c672a4d83a59d6383f8 (patch)
tree02619079973580147ccf2cf2e7e4567b7d69e022 /.github/workflows
parent14195e10b01fec3d9ded6e664a416c5cf3d33cc9 (diff)
downloademacs-wttrin-b83865a65eb744f6d36c1c672a4d83a59d6383f8.tar.gz
emacs-wttrin-b83865a65eb744f6d36c1c672a4d83a59d6383f8.zip
fix(ci): rewrite mode-init-order test and retry deps install
Two CI failures from the first run, neither a real bug in production code. The Emacs-snapshot job failed on `test-wttrin-mode-initialization-order-normal-mode-before-buffer-local-vars-calls-mode-first`. The original test mocked the `set' primitive to detect when `xterm-color--state' was first set. That worked on the byte-code path some older Emacs versions used, but `setq-local' doesn't go through the `set' function on Emacs master, so the mock never fired and the assertion read nil. The test was already brittle in isolation locally too. Rewrote the test to use `advice-add :before' on `wttrin-mode' and `make-local-variable'. Both are ordinary advisable functions, and `make-local-variable' is on the code path for every form that defines a buffer-local binding (`setq-local', `defvar-local', etc.) so the observation holds across Emacs versions. Renamed the test to drop "calls-mode-first" and use "mode-runs-before-xterm-color-state-binding" since that's what the new advice actually observes. The Emacs 26.3 job failed with a transient DNS error from elpa.gnu.org during `make deps'. Wrapped the install step in a 3-attempt retry with a 15-second backoff so a runner-side network blip doesn't fail the build. Applied to all three jobs (test, lint, coverage) since they all hit the same archives.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml39
1 files changed, 36 insertions, 3 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4876c76..d8fa309 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -33,7 +33,18 @@ jobs:
version: 'snapshot'
- name: Install dependencies
- run: make deps
+ run: |
+ for attempt in 1 2 3; do
+ if make deps; then
+ exit 0
+ fi
+ if [ "$attempt" -lt 3 ]; then
+ echo "::warning::deps install attempt $attempt failed, retrying in 15s"
+ sleep 15
+ fi
+ done
+ echo "::error::deps install failed after 3 attempts"
+ exit 1
- name: Run tests
run: make test
@@ -55,7 +66,18 @@ jobs:
version: 'snapshot'
- name: Install dependencies
- run: make deps
+ run: |
+ for attempt in 1 2 3; do
+ if make deps; then
+ exit 0
+ fi
+ if [ "$attempt" -lt 3 ]; then
+ echo "::warning::deps install attempt $attempt failed, retrying in 15s"
+ sleep 15
+ fi
+ done
+ echo "::error::deps install failed after 3 attempts"
+ exit 1
- name: Run linters
run: make lint
@@ -77,7 +99,18 @@ jobs:
version: 'snapshot'
- name: Install dependencies
- run: make deps
+ run: |
+ for attempt in 1 2 3; do
+ if make deps; then
+ exit 0
+ fi
+ if [ "$attempt" -lt 3 ]; then
+ echo "::warning::deps install attempt $attempt failed, retrying in 15s"
+ sleep 15
+ fi
+ done
+ echo "::error::deps install failed after 3 attempts"
+ exit 1
- name: Run coverage
run: make coverage