1
0
Fork 0

Add steps to README for adding a configuration package

This commit is contained in:
Tom Willemse 2020-03-27 16:01:29 -07:00
parent 6be4d9c526
commit 183da25fd3

View file

@ -1,3 +1,5 @@
* Installing
To use this repository execute the following commands in Emacs:
#+begin_src emacs-lisp
@ -5,3 +7,35 @@ To use this repository execute the following commands in Emacs:
(package-refresh-contents)
(package-install 'oni-package)
#+end_src
* Adding new configurations
When you add a new configuration file, also add at least a test that it
actually gets loaded:
: tests/integration/oni-example-mode.bats
#+begin_src bats
#!/usr/bin/env bats
@test "Opening a .example file loads oni-example-mode" {
run emacs -batch -l package -f package-initialize \
-visit test.example \
-eval "(prin1 (featurep 'oni-example-mode))"
echo "$output"
[[ "$output" == "t" ]]
}
#+end_src
And add the integration test in =.gitlab.yaml=:
#+begin_src yaml
integration-test-oni-example-mode:
stage: integration-test
image: registry.gitlab.com/ryuslash/emacs-config
dependencies:
- package
script: make integration-test-oni-example-mode TEST_ARCHIVE=$(realpath bin/)
#+end_src