diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-05 05:27:12 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-05 05:27:12 -0500 |
| commit | 69d8b29f839d8fee957e644013000f90c1283be4 (patch) | |
| tree | 1e003871ed3fa3a11e15e3e0b643cbf0f16d7a13 /tests | |
| parent | 1487cbc03d1c447e9c4b31bfbe44330df10a6d29 (diff) | |
| download | chime-69d8b29f839d8fee957e644013000f90c1283be4.tar.gz chime-69d8b29f839d8fee957e644013000f90c1283be4.zip | |
ci: add GitHub Actions workflow with test matrix, lint, and coverage
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.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run-coverage-file.el | 12 |
1 files changed, 9 insertions, 3 deletions
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)) |
