Skip to content

Commit

Permalink
ci: Add basic test
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Nov 18, 2024
1 parent c2c6974 commit f0a2153
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 2 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
emacs-version:
- 26.3
- 27.2
- 28.2
- 29.4
experimental: [false]
include:
- os: ubuntu-latest
emacs-version: snapshot
experimental: true
- os: macos-latest
emacs-version: snapshot
experimental: true
- os: windows-latest
emacs-version: snapshot
experimental: true
exclude:
- os: macos-latest
emacs-version: 26.3
- os: macos-latest
emacs-version: 27.2

steps:
- uses: actions/checkout@v4

- uses: jcs090218/setup-emacs@master
with:
version: ${{ matrix.emacs-version }}

- uses: emacs-eask/setup-eask@master
with:
version: 'snapshot'

- name: Run tests
run:
make ci
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# ignore these extensions
*.elc

/.eask
/dist
20 changes: 20 additions & 0 deletions Eask
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
(package "helm-lsp"
"0.2"
"LSP helm integration")

(website-url "https://github.com/emacs-lsp/helm-lsp")
(keywords "languages" "debug")

(package-file "helm-lsp.el")

(script "test" "echo \"Error: no test specified\" && exit 1")

(source 'gnu)
(source 'melpa)

(depends-on "emacs" "26.1")
(depends-on "dash" "2.14.1")
(depends-on "lsp-mode" "5.0")
(depends-on "helm" "2.0")

(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
EMACS ?= emacs
EASK ?= eask

.PHONY: clean checkdoc lint package install compile test

ci: clean package install compile

package:
@echo "Packaging..."
$(EASK) package

install:
@echo "Installing..."
$(EASK) install

compile:
@echo "Compiling..."
$(EASK) compile

test:
@echo "Testing..."
$(EASK) test ert ./test/*.el

checkdoc:
@echo "Run checkdoc..."
$(EASK) lint checkdoc

lint:
@echo "Run package-lint..."
$(EASK) lint package

clean:
$(EASK) clean all
4 changes: 2 additions & 2 deletions helm-lsp.el
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

;; Author: Ivan Yonchovski <yyoncho@gmail.com>
;; Keywords: languages, debug
;; URL: https://github.com/yyoncho/helm-lsp
;; Package-Requires: ((emacs "25.1") (dash "2.14.1") (lsp-mode "5.0") (helm "2.0"))
;; URL: https://github.com/emacs-lsp/helm-lsp
;; Package-Requires: ((emacs "26.1") (dash "2.14.1") (lsp-mode "5.0") (helm "2.0"))
;; Version: 0.2

;;; Commentary:
Expand Down

0 comments on commit f0a2153

Please sign in to comment.