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. --- .github/workflows/ci.yml | 100 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 .github/workflows/ci.yml (limited to '.github/workflows') 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 -- cgit v1.2.3