branch: elpa/treepy
commit 806c000bd40153d17dfa5709c6d19546d507a416
Merge: 28f0e2c2c7 450ac61ad4
Author: Daniel Barreto <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #19 from dannywillems/fix/test-warnings
Silence test byte-compile warnings; add CI
---
.github/dependabot.yml | 6 ++++++
.github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++
test/treepy.el-zipper-test.el | 6 +++---
treepy.el | 2 +-
4 files changed, 49 insertions(+), 4 deletions(-)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000000..ca79ca5b4d
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,6 @@
+version: 2
+updates:
+ - package-ecosystem: github-actions
+ directory: /
+ schedule:
+ interval: weekly
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000000..43c16e72ee
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,39 @@
+name: CI
+
+on:
+ push:
+ pull_request:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ # Minimum supported (Package-Requires) + latest stable + snapshot.
+ emacs_version:
+ - '27.1'
+ - '30.1'
+ - snapshot
+ steps:
+ - uses: actions/checkout@v5
+
+ - uses: purcell/setup-emacs@master
+ with:
+ version: ${{ matrix.emacs_version }}
+
+ - name: Byte-compile (warnings as errors)
+ run: |
+ emacs -Q --batch -L . -L test \
+ --eval '(setq byte-compile-error-on-warn t)' \
+ -f batch-byte-compile \
+ treepy.el \
+ test/treepy.el-zipper-test.el \
+ test/treepy.el-walker-test.el
+
+ - name: Run tests
+ run: |
+ emacs -Q --batch -L . -L test \
+ -l test/treepy.el-zipper-test.el \
+ -l test/treepy.el-walker-test.el \
+ -f ert-run-tests-batch-and-exit
diff --git a/test/treepy.el-zipper-test.el b/test/treepy.el-zipper-test.el
index 8490a63568..be5444032f 100644
--- a/test/treepy.el-zipper-test.el
+++ b/test/treepy.el-zipper-test.el
@@ -260,7 +260,7 @@
;;; Preorder vs Postorder
-(setq numered-tree '(1 . ((2 . (4 5)) 3)))
+(defvar numered-tree '(1 . ((2 . (4 5)) 3)))
(defun numered-children (node)
(cdr node))
@@ -368,7 +368,7 @@ be (defn new-&node-type> [field-map])."
(:concat `((:args . ,children)))
(:value `((:val . ,(car children))))))))
-(setq custom-zipper (treepy-zipper #'custom-branch-p #'custom-children
#'custom-make-node custom-tree))
+(defvar custom-zipper (treepy-zipper #'custom-branch-p #'custom-children
#'custom-make-node custom-tree))
(defun can-simplify-concat? (node)
(and (equal ':concat (node-type node))
@@ -470,7 +470,7 @@ be (defn new-&node-type> [field-map])."
(defun treepy-parseclj--make-node (node children)
- "Helper parseclj function to create nodes 'a la treepy'.
+ "Helper parseclj function to create nodes a la treepy.
NODE is an AST node. CHILDREN is a list of AST nodes."
(mapcar (lambda (pair)
(if (eql (car pair) :children)
diff --git a/treepy.el b/treepy.el
index 78b7e3ca36..03ddea726b 100644
--- a/treepy.el
+++ b/treepy.el
@@ -6,7 +6,7 @@
;; Keywords: lisp, maint, tools
;; Created: Mon Jul 10 15:17:36 2017 (+0200)
;; Version: 0.1.3
-;; Package-Requires: ((emacs "25.1"))
+;; Package-Requires: ((emacs "27.1"))
;; URL: https://github.com/volrath/treepy.el
;; This program is free software: you can redistribute it and/or modify