diff options
author | Tom Willemse | 2020-03-27 16:01:29 -0700 |
---|---|---|
committer | Tom Willemse | 2020-03-27 16:01:29 -0700 |
commit | 183da25fd39d2e6abeb26bde065c53e6c7fbb0dd (patch) | |
tree | 76c6acd0b0f2950cfe7a870b06c61038330755cf | |
parent | 6be4d9c52631c8a06c3d7d589caa6975ff82cc35 (diff) | |
download | emacs-config-183da25fd39d2e6abeb26bde065c53e6c7fbb0dd.tar.gz emacs-config-183da25fd39d2e6abeb26bde065c53e6c7fbb0dd.zip |
Add steps to README for adding a configuration package
-rw-r--r-- | README.org | 46 |
1 files changed, 40 insertions, 6 deletions
@@ -1,7 +1,41 @@ -To use this repository execute the following commands in Emacs: +* Installing -#+begin_src emacs-lisp - (add-to-list 'package-archives '("oni" . "https://ryuslash.org/elpa/")) - (package-refresh-contents) - (package-install 'oni-package) -#+end_src + To use this repository execute the following commands in Emacs: + + #+begin_src emacs-lisp + (add-to-list 'package-archives '("oni" . "https://ryuslash.org/elpa/")) + (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 |