diff --git a/.github/workflows/sanity.yml b/.github/workflows/sanity.yml index f39be763..06036501 100644 --- a/.github/workflows/sanity.yml +++ b/.github/workflows/sanity.yml @@ -37,5 +37,8 @@ jobs: - name: Test - Normal startup run: ./pew/tests/test-init.sh $(pwd) + - name: Test - Mini startup + run: ./pew/tests/test-init-mini.sh $(pwd) + - name: Test - pewcfg unittests run: ./pew/site-lisp/pewcfg/tests/run-tests.sh $(pwd) diff --git a/pew/tests/test-init-mini.sh b/pew/tests/test-init-mini.sh new file mode 100755 index 00000000..d3c11ee3 --- /dev/null +++ b/pew/tests/test-init-mini.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env -S emacs --batch --script +;;; test-init-mini.sh --- Test minimal startup -*- mode: emacs-lisp; lexical-binding: t; -*- +;;; Commentary: +;;; Code: + +;;; Process arguments +(if (< (length argv) 1) (error "Not enough arguments")) +(setq repo-root-path (nth 0 argv)) + +;;; Test starts +(require 'url-vars) +(let* ((debug-on-error t) + (url-show-status nil) + (user-emacs-directory repo-root-path) + (user-init-file (expand-file-name "init-mini.el" user-emacs-directory)) + (load-path (delq user-emacs-directory load-path))) + (load-file user-init-file) + (run-hooks 'after-init-hook) + (run-hooks 'emacs-startup-hook) + (message "%s started in %s" (emacs-version) (emacs-init-time)))