branch: externals/relint commit 0cbcadba77d857d1e4f9a4fc4ef44a24176e3473 Author: Mattias Engdegård <matti...@acm.org> Commit: Mattias Engdegård <matti...@acm.org>
Add github auto-test infrastructure From a suggestion by Paul Pogonyshev (bug#9). --- .github/workflows/test.yml | 37 +++++++++++++++++++++++++++++++++++++ Makefile | 20 ++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..3e23562 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: test + +on: + push: + paths-ignore: + - '**README*' + pull_request: + paths-ignore: + - '**README*' + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + emacs_version: + - "26.3" + - snapshot + steps: + - name: Set up Emacs + uses: purcell/setup-emacs@master + with: + version: ${{matrix.emacs_version}} + + - name: Check out relint + uses: actions/checkout@v2 + with: + path: relint + + - name: Check out xr + uses: actions/checkout@v2 + with: + repository: mattiase/xr + path: xr + + - name: Test + run: make -C relint build check diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b143637 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +EMACS=emacs +XRDIR=../xr +EMFLAGS=-Q -batch -L . -L $(XRDIR) +BYTECOMPFLAGS=--eval '(setq byte-compile-error-on-warn t)' + +EL=$(wildcard *.el) +ELC=$(EL:.el=.elc) + +.PHONY: build check clean + +build: $(ELC) + +clean: + rm -f $(ELC) + +check: + $(EMACS) $(EMFLAGS) -l relint-test -f ert-run-tests-batch-and-exit + +%.elc: %.el + $(EMACS) $(EMFLAGS) $(BYTECOMPFLAGS) -f batch-byte-compile $^