aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-05 05:27:12 -0500
committerCraig Jennings <c@cjennings.net>2026-05-05 05:27:12 -0500
commit69d8b29f839d8fee957e644013000f90c1283be4 (patch)
tree1e003871ed3fa3a11e15e3e0b643cbf0f16d7a13 /.github/workflows/ci.yml
parent1487cbc03d1c447e9c4b31bfbe44330df10a6d29 (diff)
downloadchime-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 '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml100
1 files changed, 100 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..6ad5618
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,100 @@
+name: CI
+
+on:
+ push:
+ branches: [main]
+ tags: ['v*']
+ pull_request:
+ branches: [main]
+
+jobs:
+ test:
+ name: Test (Emacs ${{ matrix.emacs_version }})
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ emacs_version: ['27.1', '28.2', '29.4', '30.1']
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Emacs
+ uses: jcs090218/setup-emacs@master
+ with:
+ version: ${{ matrix.emacs_version }}
+
+ - name: Set up Eask
+ uses: emacs-eask/setup-eask@master
+ with:
+ version: 'snapshot'
+
+ - name: Install dependencies
+ run: eask install-deps --dev
+
+ - name: Byte-compile (warnings are errors)
+ run: make compile
+
+ - name: Run full test suite
+ run: make test-all
+
+ lint:
+ name: Lint (advisory)
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Emacs
+ uses: jcs090218/setup-emacs@master
+ with:
+ version: '29.4'
+
+ - name: Set up Eask
+ uses: emacs-eask/setup-eask@master
+ with:
+ version: 'snapshot'
+
+ - name: Install dependencies
+ run: eask install-deps --dev
+
+ # Lint output is informational while the MELPA-prep backlog is being
+ # worked through. Tighten to required once that backlog is clear.
+ - name: package-lint
+ continue-on-error: true
+ run: eask lint package
+
+ - name: checkdoc
+ continue-on-error: true
+ run: eask lint checkdoc
+
+ - name: elisp-lint
+ continue-on-error: true
+ run: make lint
+
+ coverage:
+ name: Coverage
+ runs-on: ubuntu-latest
+ needs: test
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Emacs
+ uses: jcs090218/setup-emacs@master
+ with:
+ version: '29.4'
+
+ - name: Set up Eask
+ uses: emacs-eask/setup-eask@master
+ with:
+ version: 'snapshot'
+
+ - name: Install dependencies
+ run: eask install-deps --dev
+
+ - name: Generate coverage report
+ run: make coverage
+
+ - name: Upload to Coveralls
+ uses: coverallsapp/github-action@v2
+ with:
+ file: .coverage/coveralls.json
+ format: coveralls