branch: externals/yaml
commit 95efacd2050e773af95e774cdc8fecd74bd4856a
Merge: f2369fb498 ff56e884c9
Author: Zachary Romero <[email protected]>
Commit: GitHub <[email protected]>

    Merge pull request #66 from dannywillems/fix/unused-lexical-vars
    
    Silence unused-variable byte-compile warnings; widen CI
---
 .github/dependabot.yml     |  6 ++++++
 .github/workflows/test.yml | 38 ++++++++++++++++++++++++++++++--------
 yaml-tests.el              |  4 ++--
 3 files changed, 38 insertions(+), 10 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/test.yml b/.github/workflows/test.yml
index e920f2fec3..ad23ae3778 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -2,13 +2,35 @@ name: CI
 on: [push, pull_request]
 
 jobs:
-  build:
+  test:
     runs-on: ubuntu-latest
     steps:
-    - uses: purcell/setup-emacs@master
-      with:
-        version: 27.2
-    - uses: actions/checkout@v2
-    - name: Run tests
-      run: |
-        emacs -Q --batch -L . -l *-tests.el -f ert-run-tests-batch-and-exit
+      - uses: actions/checkout@v5
+      - uses: purcell/setup-emacs@master
+        with:
+          version: 27.2
+      - name: Run tests
+        run: |
+          emacs -Q --batch -L . -l *-tests.el \
+            -f ert-run-tests-batch-and-exit
+
+  compile:
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        # Minimum supported (Package-Requires) + latest stable + snapshot.
+        emacs_version:
+          - '25.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 . \
+            --eval '(setq byte-compile-error-on-warn t)' \
+            -f batch-byte-compile yaml.el yaml-tests.el
diff --git a/yaml-tests.el b/yaml-tests.el
index 70513ecb95..8f97174a60 100644
--- a/yaml-tests.el
+++ b/yaml-tests.el
@@ -496,7 +496,7 @@ foo: bar
 - [ {JSON: like}:adjacent ]"))
 
   ;; example 7.22
-  (should (not (condition-case n
+  (should (not (condition-case nil
                    (yaml-parse-string "[ foo
  bar: invalid,
  \"foo...>1K characters...bar\": invalid ]")
@@ -552,7 +552,7 @@ keep: |+
 (defun yaml-test-round-trip (o)
   "Test (equal (decode (encode o)) o)"
   (let* ((encoded (yaml-encode o))
-         (parsed (yaml-parse-string encoded
+         (_parsed (yaml-parse-string encoded
                                                        :object-type 'alist
                                                        :sequence-type 'list))
          (encoded-2 (yaml-encode o)))

Reply via email to