GitHub Action
Emacs Lisp check
Provides a zero-config CI solution for Emacs Lisp packages.
Most Emacs packages currently use either no or an ad-hoc script based CI setup. This GitHub Action aims to change that.
Adding this Action to your Emacs package repository immediately provides you with a default suite of code style checks that are required to get your package accepted into MELPA. Using only one additional line of YAML, you can also run your ERT tests on GitHub Actions.
See the actions tab for runs of this action! 🚀
See the COMPARISON.md file for a more thorough comparison with other solutions for Emacs Lisp CI. 🛒
- melpa :: Most checks required for MELPA
- load-file :: Load files into Emacs
- byte-compile :: Byte-compile files
- checkdoc :: Check documentation style
- package-lint :: Check coding practices
- ert :: Run ERT tests
- Require zero configuration for great results
- Support accepted Emacs Lisp coding standards and test frameworks
- Expose helpful code annotations
- Support running checks on your local machine (
elisp-check-run
) - Support older Emacs versions (24.1 and up)
- Support esoteric practices not accepted by MELPA
- Define or use opinionated style checks
uses: leotaku/elisp-check@master
with:
file: main-file.el
uses: leotaku/elisp-check@master
with:
check: ert
file: test-file.el
Note that this action does not install a suitable emacs
executable by itself.
For this purpose, I recommend using Steve Purcell's excellent setup-emacs GitHub Action.
For an example of real-life usage, see the Actions config for my theist-mode
package.
uses: leotaku/elisp-check@master
with:
check: melpa
file: '*.el'
ignore_warnings: false
warnings_as_errors: false
The above yaml code block shows the default configuration values for this GitHub Action.
Name | Description | Type |
---|---|---|
check |
Emacs Lisp check to execute | Supported check |
file |
Entry file for Emacs Lisp check | File with globbing |
ignore_warnings |
Whether to ignore warnings | Boolean |
warnings_as_errors |
Whether to treat warnings as errors | Boolean |
Users are encouraged to make use of GitHub Actions matrix feature to run different checks, check different entry files and test compatibility with different versions of Emacs.
It is entirely possible to use your preferred Emacs package manager, or simply load-file
, to load elisp-check.el
into your local Emacs instance.
The function elisp-check-run
may then be used to run any supported check locally.
Errors and warnings are emitted to the Emacs *Messages*
buffer, so both batch and interactive usage is supported.
This project and its documentation were heavily inspired by and at times derive from Steve Purcell's work.
If possible, please support him and his efforts.