emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/adoc-mode 46e8ea4126 129/199: Add Eldev and a GHA workflow


From: ELPA Syncer
Subject: [nongnu] elpa/adoc-mode 46e8ea4126 129/199: Add Eldev and a GHA workflow based on it
Date: Sun, 3 Sep 2023 06:59:40 -0400 (EDT)

branch: elpa/adoc-mode
commit 46e8ea4126ef047c0cc78b394742963c41944142
Author: Bozhidar Batsov <bozhidar@batsov.dev>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>

    Add Eldev and a GHA workflow based on it
    
    I've also added a bunch of hacking guidelines for potential contributors.
---
 .github/workflows/test.yml | 34 ++++++++++++++++++++++++
 .gitignore                 |  1 +
 Eldev                      |  1 +
 README.md                  | 66 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 102 insertions(+)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000000..2767f9852c
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,34 @@
+name: CI
+
+on:
+  push:
+    paths-ignore: ['**.md', '**.adoc']
+  pull_request:
+    paths-ignore: ['**.md', '**.adoc']
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    continue-on-error: ${{matrix.emacs_version == 'snapshot'}}
+
+    strategy:
+      matrix:
+        # Earliest supported + latest in each stable branch + snapshot.
+        emacs_version: ['25.1', '25.3', '26.3', '27.1', '28.1', 'snapshot']
+
+    steps:
+    - name: Set up Emacs
+      uses: purcell/setup-emacs@master
+      with:
+        version: ${{matrix.emacs_version}}
+
+    - name: Install Eldev
+      run: curl -fsSL 
https://raw.github.com/doublep/eldev/master/webinstall/github-eldev | sh
+
+    - name: Check out the source code
+      uses: actions/checkout@v2
+
+    - name: Test the project
+      run: |
+        eldev -p -dtT -C test --expect 100
+        eldev -dtT -C compile --warnings-as-errors
diff --git a/.gitignore b/.gitignore
index d27fb030ab..3e4ada4c83 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 *.elc
 #*#
 TAGS
+.eldev
diff --git a/Eldev b/Eldev
new file mode 100644
index 0000000000..c51ddaa95a
--- /dev/null
+++ b/Eldev
@@ -0,0 +1 @@
+(eldev-use-package-archive 'melpa)
diff --git a/README.md b/README.md
index b5185065a4..82e650c062 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,4 @@
+[![Build 
Status](https://github.com/emacsorphanage/adoc-mode/workflows/CI/badge.svg)](https://github.com/emacsorphanage/adoc-mode/actions?query=workflow%3ACI)
 [![MELPA][melpa-badge]][melpa-package]
 [![MELPA Stable][melpa-stable-badge]][melpa-stable-package]
 
@@ -85,6 +86,71 @@ characters are visible, however meta characters are 
displayed in a faint way.
 
 ![screenshot](http://dl.dropbox.com/u/75789984/adoc-mode.png)
 
+## Hacking
+
+adoc-mode uses [Eldev](https://github.com/doublep/eldev) for development, so
+you should install the tool first.
+
+The easiest and "purest" way to run adoc-mode is to execute:
+
+    $ eldev emacs
+
+This will start a separate Emacs process with adoc-mode and its
+dependencies available, but _without_ your normal packages installed.
+However, you can use `Eldev-local` to add some packages with
+`(eldev-add-extra-dependencies 'emacs ...)` forms.  See Eldev
+documentation for details.
+
+Alternatively, if you want to load adoc-mode from source code in the Emacs
+you use for editing:
+
+- Generate autoloads file (that's done automatically when installing
+via `package.el` but you'll have to do it manually in this case):
+
+``` shellsession
+$ eldev build :autoloads
+```
+
+- Add to your `.emacs`:
+
+``` emacs-lisp
+;; load adoc-mode from its source code
+(add-to-list 'load-path "~/projects/adoc-mode")
+(load "adoc-mode-autoloads" t t)
+```
+
+### Changing the code
+
+It's perfectly fine to load adoc-mode from `package.el` and then to start 
making
+experiments by changing existing code and adding new code.
+
+A very good workflow is to just open the source code you've cloned and start
+evaluating the code you've altered/added with commands like `C-M-x`,
+`eval-buffer` and so on.
+
+Once you've evaluated the new code, you can invoke some interactive command 
that
+uses it internally or open a Emacs Lisp REPL and experiment with it there. You
+can open an Emacs Lisp REPL with `M-x ielm`.
+
+You can also quickly evaluate some Emacs Lisp code in the minibuffer with 
`M-:`.
+
+### Running the tests
+
+Run all tests with:
+
+ $ eldev test
+
+NOTE: Tests may not run correctly inside Emacs' `shell-mode` buffers. Running
+them in a terminal is recommended.
+
+You can also check for compliance with a variety of coding standards in batch 
mode (including docstrings):
+
+ $ eldev lint
+
+To check for byte-compilation warnings you can just compile the project with 
Eldev:
+
+ $ eldev compile
+
 ## License
 
 Copyright © 2010-2013 Florian Kaufmann



reply via email to

[Prev in Thread] Current Thread [Next in Thread]