From 69d8b29f839d8fee957e644013000f90c1283be4 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 5 May 2026 05:27:12 -0500 Subject: ci: add GitHub Actions workflow with test matrix, lint, and coverage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I added `.github/workflows/ci.yml` with three jobs: 1. test — Emacs 27.1 / 28.2 / 29.4 / 30.1, runs `make compile` (strict warnings) and `make test-all`. fail-fast off so one version's failure doesn't hide others. 2. lint (advisory) — `eask lint package`, `eask lint checkdoc`, and `make lint` (elisp-lint). All three are `continue-on-error: true` because there's an existing MELPA-prep backlog (1 package-lint error in chime-org-contacts.el, ~17 cosmetic checkdoc/package-lint warnings) that's worth surfacing without blocking CI. Tighten to required once the backlog is cleared. 3. coverage — runs the full suite with undercover and uploads to Coveralls via the official action. No secret needed because the repo is public — GITHUB_TOKEN is enough. Two supporting changes: - `tests/run-coverage-file.el` now switches between simplecov (local) and coveralls (CI, detected via the `CI` env var GitHub Actions sets automatically) report formats. The Coveralls action expects coveralls JSON. - `Makefile`'s `coverage' target now runs ALL_TESTS with selector `t', not UNIT_TESTS with `(not (tag :slow))'. Without this the integration tests contributed nothing to the reported coverage number. --- tests/run-coverage-file.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/run-coverage-file.el b/tests/run-coverage-file.el index 0a07696..d96f8d2 100644 --- a/tests/run-coverage-file.el +++ b/tests/run-coverage-file.el @@ -31,13 +31,19 @@ ;; otherwise overwrite the value. (setq undercover-force-coverage t) +;; Local runs emit simplecov for whatever local tooling wants it. CI sets +;; CI=true (GitHub Actions does this automatically), so we emit a coveralls +;; JSON instead and leave it on disk for the upload action to pick up. ;; The `undercover' macro splices each configuration list into `(list ,@it)', ;; which evaluates the elements. Wildcard strings have to stay atoms — using ;; `(:files ...)' form lets us evaluate `expand-file-name' to an absolute path. (undercover (:files (expand-file-name "chime.el" run-coverage--project-root)) - (:report-format 'simplecov) - (:report-file (expand-file-name ".coverage/simplecov.json" - run-coverage--project-root)) + (:report-format (if (getenv "CI") 'coveralls 'simplecov)) + (:report-file (expand-file-name + (if (getenv "CI") + ".coverage/coveralls.json" + ".coverage/simplecov.json") + run-coverage--project-root)) (:merge-report t) (:send-report nil)) -- cgit v1.2.3