~vonfry/zoxide.el

493f4b357481b9c7588698092c9fe6eb75ab0085 — Vonfry 1 year, 5 months ago ec058d7
ci: add check
4 files changed, 44 insertions(+), 3 deletions(-)

M .gitlab-ci.yml
A .gitlab/check.el
A .gitlab/deps.el
M Makefile
M .gitlab-ci.yml => .gitlab-ci.yml +9 -3
@@ 1,14 1,20 @@
stages:
  - check
  - build
  - deploy

default:
  image: ubuntu

build:
  before_script:
    - apt update
    - apt install -y make emacs
    - apt install -y make ca-cacert emacs

check:
  script:
    - make check
  stage: check

build:
  script:
    - make
  stage: build

A .gitlab/check.el => .gitlab/check.el +15 -0
@@ 0,0 1,15 @@
(setq ci-dir (getenv "CI_PROJECT_DIR")
      gitlab-dir (expand-file-name ".gitlab" ci-dir))

(load (expand-file-name "deps" gitlab-dir))

(package-install 'package-lint)


(with-current-buffer (window-buffer (package-lint-current-buffer))
  (message "%s" (buffer-string)))

(checkdoc-current-buffer t)

(with-current-buffer (get-buffer checkdoc-diagnostic-buffer)
  (message "%s" (buffer-string)))

A .gitlab/deps.el => .gitlab/deps.el +15 -0
@@ 0,0 1,15 @@
(require 'xdg)
(setq ci-dir (getenv "CI_PROJECT_DIR")
      build-dir (expand-file-name ".build" ci-dir)
      cache-dir (xdg-cache-home))

(message (concat "ci dir: " ci-dir))
(message (concat "build dir: " build-dir))
(message (concat "cache dir: " cache-dir))

(setq-default package-user-dir (expand-file-name "emacs/packages" cache-dir))

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(package-refresh-contents)

M Makefile => Makefile +5 -0
@@ 8,3 8,8 @@ clean:

%.elc: %.el
	$(BATCH) --eval '(byte-compile-file "$<")'

check: check.zoxide

check.%: %.el
	$(BATCH) "$<" -l ".gitlab/check.el"