Skip to content

Commit

Permalink
test: Add basic test
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Nov 19, 2024
1 parent f660e87 commit 3420d82
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 7 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
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:
- 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: 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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ tramp
# AUCTeX auto folder
/auto/

# cask packages
.cask/
# eask packages
.eask/
dist/

# Flycheck
Expand Down
4 changes: 0 additions & 4 deletions Cask

This file was deleted.

19 changes: 19 additions & 0 deletions Eask
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
(package "lsp-focus"
"1.0.0"
"focus.el support for lsp-mode")

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

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

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

(source "gnu")
(source "melpa")

(depends-on "emacs" "27.1")
(depends-on "focus" "0.1.1")
(depends-on "lsp-mode" "6.1")

(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
3 changes: 2 additions & 1 deletion lsp-focus.el
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
;;; lsp-focus.el --- focus.el support for lsp-mode -*- lexical-binding: t; -*-

;; Copyright (C) 2019-2020 Vibhav Pant <[email protected]>
;; Copyright (C) 2024 emacs-lsp maintainers

;; Author: Vibhav Pant
;; Version: 1.0.0
;; Keywords: languages lsp-mode
;; Package-Requires: ((emacs "26.1") (focus "0.1.1") (lsp-mode "6.1"))
;; Package-Requires: ((emacs "27.1") (focus "0.1.1") (lsp-mode "6.1"))
;; URL: https://github.com/emacs-lsp/lsp-focus

;; This program is free software; you can redistribute it and/or modify
Expand Down

0 comments on commit 3420d82

Please sign in to comment.