branch: elpa/treepy
commit 450ac61ad494fece47c829dc32fcc987c0ca18a4
Author: Danny Willems <[email protected]>
Commit: Danny Willems <[email protected]>

    ci: add GitHub Actions and dependabot; correct minimum Emacs to 27.1
    
    Byte-compile (warnings as errors) and run the test suite on the minimum
    supported Emacs, the latest stable (30.1), and the development snapshot.
    Add dependabot to keep the actions current.
    
    Correct Package-Requires from 25.1 to 27.1: treepy.el uses
    `with-suppressed-warnings' (added in Emacs 27.1), so 25.1 was never
    actually supported (it fails to byte-compile there).
---
 .github/dependabot.yml   |  6 ++++++
 .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++
 treepy.el                |  2 +-
 3 files changed, 46 insertions(+), 1 deletion(-)

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/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

Reply via email to