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

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

[nongnu] elpa/d-mode 32446a7 338/346: Merge pull request #107 from Cyber


From: ELPA Syncer
Subject: [nongnu] elpa/d-mode 32446a7 338/346: Merge pull request #107 from CyberShadow/github-actions
Date: Sun, 29 Aug 2021 11:00:56 -0400 (EDT)

branch: elpa/d-mode
commit 32446a79b77170c5cdf0c802213f4334c777160a
Merge: 1931ec9 34f44cf
Author: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #107 from CyberShadow/github-actions
    
    Migrate from Travis CI to GitHub Actions
---
 .github/workflows/test.yml  | 26 ++++++++++++++++++++++++++
 .travis.yml                 | 35 -----------------------------------
 README.md                   |  2 +-
 d-mode-test.el              |  8 +++-----
 d-mode.el                   |  4 +++-
 tests/I0019.d               |  2 +-
 tests/I0021.d               |  4 ++++
 tests/I0067.d               |  2 +-
 tests/I0082.d               |  2 +-
 tests/I0082.d.html          |  2 +-
 tests/I0093_35907724.d      |  2 +-
 tests/I0093_35907724.d.html |  2 +-
 tests/I0102.d               |  1 -
 tests/fonts_auto.d          |  1 -
 tests/fonts_auto.d.html     |  2 +-
 tests/fonts_params.d        |  2 +-
 tests/fonts_params.d.html   |  2 +-
 tests/imenu2.d              |  2 +-
 18 files changed, 47 insertions(+), 54 deletions(-)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..ea827df
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,26 @@
+name: Test
+on: [ push, pull_request ]
+jobs:
+  test:
+    runs-on: ubuntu-20.04
+    strategy:
+      matrix:
+        emacs_version:
+        - 25.1
+        - 25.2
+        - 25.3
+        - 26.1
+        - 26.2
+        - 26.3
+        - 27.1
+        - snapshot
+    steps:
+    - uses: purcell/setup-emacs@master
+      with:
+        version: ${{ matrix.emacs_version }}
+    - uses: conao3/setup-cask@master
+    - uses: actions/checkout@v2
+    - name: Test
+      run: |
+        cask install
+        COVERALLS_PARALLEL=1 
COVERALLS_REPO_TOKEN=f3VyR3js03R8zyeA32NWscNBNTR7OYR5k make test
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 0ceab33..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-# Based on https://github.com/flycheck/emacs-travis
-
-language: emacs-lisp
-sudo: required
-dist: trusty
-# Allow Emacs snapshot builds to fail and don’t wait for these as they can take
-# a looooong time
-matrix:
-  fast_finish: true
-  allow_failures:
-    - env: EMACS_VERSION=snapshot
-env:
-  - EMACS_VERSION=25.1
-  - EMACS_VERSION=25.2
-  - EMACS_VERSION=25.3
-  - EMACS_VERSION=26.1
-  - EMACS_VERSION=26.2
-  - EMACS_VERSION=26.3
-  - EMACS_VERSION=snapshot
-before_install:
-  # Configure $PATH: Executables are installed to $HOME/bin
-  - export PATH="$HOME/bin:$PATH"
-  # Download the makefile to emacs-travis.mk
-  - wget 
'https://raw.githubusercontent.com/CyberShadow/emacs-travis/patch-1/emacs-travis.mk'
-  # Install Emacs (according to $EMACS_VERSION) and Cask
-  - make -f emacs-travis.mk install_emacs
-  - make -f emacs-travis.mk install_cask
-install:
-  - cask install
-script:
-  # cask exec ert-runner
-  - emacs --version
-  - COVERALLS_PARALLEL=1 make test
-notifications:
-  webhooks: https://coveralls.io/webhook
diff --git a/README.md b/README.md
index b390766..c3bd5d8 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 # Emacs D Mode
 
 
[![Licence](https://img.shields.io/badge/license-GPL_2-green.svg)](https://www.gnu.org/licenses/gpl-2.0.txt)
-[![Build 
Status](https://travis-ci.org/Emacs-D-Mode-Maintainers/Emacs-D-Mode.svg)](https://travis-ci.org/Emacs-D-Mode-Maintainers/Emacs-D-Mode)
+[![Build 
Status](https://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode/workflows/Test/badge.svg)](https://github.com/Emacs-D-Mode-Maintainers/Emacs-D-Mode/actions)
 [![Coverage 
Status](https://coveralls.io/repos/github/Emacs-D-Mode-Maintainers/Emacs-D-Mode/badge.svg?branch=master)](https://coveralls.io/github/Emacs-D-Mode-Maintainers/Emacs-D-Mode?branch=master)
 
[![MELPA](https://melpa.org/packages/d-mode-badge.svg)](https://melpa.org/#/d-mode)
 [![MELPA 
Stable](https://stable.melpa.org/packages/d-mode-badge.svg)](https://stable.melpa.org/#/d-mode)
diff --git a/d-mode-test.el b/d-mode-test.el
index 222485a..529cba7 100644
--- a/d-mode-test.el
+++ b/d-mode-test.el
@@ -310,11 +310,9 @@ the reference file, raise an error."
 (defun d-test-get-expected-result (filename)
   (with-temp-buffer
     (insert-file-contents filename)
-    (let* ((min-ver
-            (if (re-search-forward "^// #min-version: \\(.+\\)$" nil t)
-                (match-string 1)
-              "0")))
-      (version<= min-ver emacs-version))))
+    (if (re-search-forward "^// #condition: \\(.+\\)$" nil t)
+        (eval (car (read-from-string (format "(progn %s)" (match-string 1)))))
+      t)))
 
 (defmacro d-test-dir (dir)
   "Register all test files from DIR with ert."
diff --git a/d-mode.el b/d-mode.el
index eea1dac..e97ff69 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -1845,7 +1845,9 @@ Key bindings:
    #'d--syntax-propertize-function)
 
   (c-common-init 'd-mode)
-  (easy-menu-add d-menu)
+  (d--if-version>= "28"
+      nil
+    (easy-menu-add d-menu))
   (c-run-mode-hooks 'c-mode-common-hook 'd-mode-hook)
   (c-update-modeline)
   (d--if-version>= "26.0"
diff --git a/tests/I0019.d b/tests/I0019.d
index 37c058a..488ba1b 100644
--- a/tests/I0019.d
+++ b/tests/I0019.d
@@ -1,4 +1,4 @@
-// #min-version: 25.1
+// #condition: (version<= "25.1" emacs-version)
 // #run: (d-test-indent)
 
 enum OtherValues2 : uint {
diff --git a/tests/I0021.d b/tests/I0021.d
index 7d4d92a..96c5cf9 100644
--- a/tests/I0021.d
+++ b/tests/I0021.d
@@ -2,3 +2,7 @@
 // #out: ((167 . 172) (227 . 232))
 auto x = `ab\`; // back-quoted string ends with a backslash
 auto y = "c\""; // double-quoted string ends with an escaped "
+
+// cc-mode bug:
+// https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45988
+// #condition: (version<= emacs-version "27")
diff --git a/tests/I0067.d b/tests/I0067.d
index 159ac92..2e7957b 100644
--- a/tests/I0067.d
+++ b/tests/I0067.d
@@ -1,4 +1,4 @@
-// #min-version: 26.1
+// #condition: (version<= "26.1" emacs-version)
 // #run: (d-test-indent)
 
 void foo(T)(T stuff)
diff --git a/tests/I0082.d b/tests/I0082.d
index b3d81eb..e19fe75 100644
--- a/tests/I0082.d
+++ b/tests/I0082.d
@@ -1,4 +1,4 @@
-// #min-version: 26.1
+// #condition: (version<= "26.1" emacs-version)
 // #run: (d-test-fontification)
 
 struct S
diff --git a/tests/I0082.d.html b/tests/I0082.d.html
index e2084b5..1d29328 100644
--- a/tests/I0082.d.html
+++ b/tests/I0082.d.html
@@ -1,4 +1,4 @@
-<span class="comment-delimiter">// </span><span class="comment">#min-version: 
26.1
+<span class="comment-delimiter">// </span><span class="comment">#condition: 
(version&lt;= &quot;26.1&quot; emacs-version)
 </span><span class="comment-delimiter">// </span><span class="comment">#run: 
(d-test-fontification)
 </span>
 <span class="keyword">struct</span> <span class="type">S</span>
diff --git a/tests/I0093_35907724.d b/tests/I0093_35907724.d
index 96b1de3..72db0f2 100644
--- a/tests/I0093_35907724.d
+++ b/tests/I0093_35907724.d
@@ -1,4 +1,4 @@
-// #min-version: 26.1
+// #condition: (version<= "26.1" emacs-version)
 // #run: (d-test-fontification)
 
 foreach (const offset, const ref element; haystack) fun();
diff --git a/tests/I0093_35907724.d.html b/tests/I0093_35907724.d.html
index 7e5965a..8a76413 100644
--- a/tests/I0093_35907724.d.html
+++ b/tests/I0093_35907724.d.html
@@ -1,4 +1,4 @@
-<span class="comment-delimiter">// </span><span class="comment">#min-version: 
26.1
+<span class="comment-delimiter">// </span><span class="comment">#condition: 
(version&lt;= &quot;26.1&quot; emacs-version)
 </span><span class="comment-delimiter">// </span><span class="comment">#run: 
(d-test-fontification)
 </span>
 <span class="keyword">foreach</span> (<span class="keyword">const</span> <span 
class="variable-name">offset</span>, <span class="keyword">const ref</span> 
<span class="variable-name">element</span>; haystack) fun();
diff --git a/tests/I0102.d b/tests/I0102.d
index 46c4da7..8281d7f 100644
--- a/tests/I0102.d
+++ b/tests/I0102.d
@@ -1,4 +1,3 @@
-// #min-version: 26.1
 // #run: (d-test-indent)
 
 version (x86) {
diff --git a/tests/fonts_auto.d b/tests/fonts_auto.d
index 3f66f8b..9e22db6 100644
--- a/tests/fonts_auto.d
+++ b/tests/fonts_auto.d
@@ -12,4 +12,3 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 auto
-*/
diff --git a/tests/fonts_auto.d.html b/tests/fonts_auto.d.html
index 50cf818..d8a0485 100644
--- a/tests/fonts_auto.d.html
+++ b/tests/fonts_auto.d.html
@@ -12,4 +12,4 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 auto
-*/</span>
+</span>
\ No newline at end of file
diff --git a/tests/fonts_params.d b/tests/fonts_params.d
index 578ce38..34de32b 100644
--- a/tests/fonts_params.d
+++ b/tests/fonts_params.d
@@ -1,4 +1,4 @@
-// #min-version: 26.1
+// #condition: (version<= "26.1" emacs-version)
 // #run: (d-test-fontification)
 
 auto dg = (Object a, Object b) {};
diff --git a/tests/fonts_params.d.html b/tests/fonts_params.d.html
index 447f8e1..d0ed92d 100644
--- a/tests/fonts_params.d.html
+++ b/tests/fonts_params.d.html
@@ -1,4 +1,4 @@
-<span class="comment-delimiter">// </span><span class="comment">#min-version: 
26.1
+<span class="comment-delimiter">// </span><span class="comment">#condition: 
(version&lt;= &quot;26.1&quot; emacs-version)
 </span><span class="comment-delimiter">// </span><span class="comment">#run: 
(d-test-fontification)
 </span>
 <span class="keyword">auto</span> <span class="variable-name">dg</span> = 
(<span class="type">Object</span> <span class="variable-name">a</span>, <span 
class="type">Object</span> <span class="variable-name">b</span>) {};
diff --git a/tests/imenu2.d b/tests/imenu2.d
index 7607d68..a0421b6 100644
--- a/tests/imenu2.d
+++ b/tests/imenu2.d
@@ -1,4 +1,4 @@
-// #min-version: 26.1
+// #condition: (version<= "26.1" emacs-version)
 // #run: (d-test-get-imenu-lines)
 // #out: (5 6 13 18 20 24 28 33 37 40 42 46 49 50 51 52 54 56)
 



reply via email to

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