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

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

[nongnu] elpa/popup 476e3c0b58 4/6: Add CI using GitHub Actions


From: ELPA Syncer
Subject: [nongnu] elpa/popup 476e3c0b58 4/6: Add CI using GitHub Actions
Date: Fri, 31 Dec 2021 13:58:23 -0500 (EST)

branch: elpa/popup
commit 476e3c0b58a7ab34f2884141f321ed1e0b2f8c02
Author: Jen-Chieh Shen <jcs090218@gmail.com>
Commit: Jen-Chieh Shen <jcs090218@gmail.com>

    Add CI using GitHub Actions
---
 .github/workflows/test.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++
 Makefile                   | 36 +++++++++++++++++++-----------------
 2 files changed, 63 insertions(+), 17 deletions(-)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000000..cfe1cecd8d
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,44 @@
+name: CI
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+
+jobs:
+    unix-test:
+        runs-on: ubuntu-latest
+        strategy:
+            matrix:
+                emacs-version:
+                    - 27.2
+                    - snapshot
+
+        steps:
+            - uses: actions/checkout@v2
+
+            - uses: actions/setup-python@v2
+              with:
+                  python-version: "3.6"
+                  architecture: "x64"
+
+            - uses: purcell/setup-emacs@master
+              with:
+                  version: ${{ matrix.emacs-version }}
+
+            - uses: cask/setup-cask@master
+              with:
+                  version: 0.8.4
+
+            - name: Setup cmake
+              uses: jwlawson/actions-setup-cmake@v1.4
+              with:
+                 cmake-version: '3.18.x'
+
+            - name: Check cmake
+              run: "cmake --version"
+
+            - name: Run tests
+              run:
+                make unix-ci
diff --git a/Makefile b/Makefile
index d26c0efa9a..435f29d4c1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,27 +1,29 @@
+SHELL := /usr/bin/env bash
+
 EMACS ?= emacs
 CASK ?= cask
-EMACS23=emacs23
 
-ELPA_DIR = $(shell EMACS=$(EMACS) $(CASK) package-directory)
+PKG-FILES := popup.el
 
-.PHONY: test test-nw test-emacs23 test-emacs23-nw travis-ci
+TEST-FILES := $(shell ls test/popup-*.el)
 
-test:
-       $(CASK) exec $(EMACS) -Q -L . -l tests/run-test.el
+.PHONY: clean checkdoc lint unix-build unix-compile    unix-test
 
-test-nw:
-       $(CASK) exec $(EMACS) -Q -nw -L . -l tests/run-test.el
+unix-ci: clean unix-build unix-compile
 
-test-emacs23: tests/ert.el
-       ${EMACS23} -Q -L . -l test/ert.el -l tests/run-test.el
+unix-build:
+       $(CASK) install
 
-test-emacs23-nw: tests/ert.el
-       $(EMACS23) -Q -nw -L . -l test/ert.el -l tests/run-test.el
+unix-compile:
+       @echo "Compiling..."
+       @$(CASK) $(EMACS) -Q --batch \
+               -L . \
+               --eval '(setq byte-compile-error-on-warn t)' \
+               -f batch-byte-compile $(PKG-FILES)
 
-travis-ci: elpa
-       $(CASK) exec $(EMACS) -batch -Q -l tests/run-test.el
+unix-test:
+       @echo "Testing..."
+       $(CASK) exec ert-runner -L . $(LOAD-TEST-FILES) -t '!no-win' -t '!org'
 
-elpa: $(ELPA_DIR)
-$(ELPA_DIR): Cask
-       $(CASK) install
-       touch $@
+clean:
+       rm -rf .cask *.elc



reply via email to

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