This commit is contained in:
Jen-Chieh Shen
2022-05-10 17:44:47 +08:00
committed by GitHub
parent 4badcf6a0c
commit d9e1f7f766
5 changed files with 95 additions and 2 deletions

43
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: CI
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
emacs-version:
- 26.3
- 27.2
- 28.1
- snapshot
steps:
- uses: actions/checkout@v2
- uses: jcs090218/setup-emacs@master
with:
version: ${{ matrix.emacs-version }}
- uses: actions/setup-node@v2
with:
node-version: '14'
- uses: emacs-eask/setup-eask@master
with:
version: 'snapshot'
- name: Run tests
run:
make ci

3
.gitignore vendored
View File

@@ -2,7 +2,8 @@
*.elc
# Packaging
.cask
.eask
dist/
# Backup files
*~

13
Eask Normal file
View File

@@ -0,0 +1,13 @@
(package "gdscript-mode"
"0.1.0"
"Major mode for Godot's GDScript language")
(package-file "gdscript-mode.el")
(files "*.el")
(source "gnu")
(depends-on "emacs" "26.3")
(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432

36
Makefile Normal file
View File

@@ -0,0 +1,36 @@
SHELL := /usr/bin/env bash
EMACS ?= emacs
EASK ?= eask
.PHONY: clean checkdoc lint package install compile test
# TODO: add `lint` if we can?
ci: clean package install compile checkdoc
package:
@echo "Packaging..."
$(EASK) package
install:
@echo "Installing..."
$(EASK) install
compile:
@echo "Compiling..."
$(EASK) compile
test:
@echo "Testing..."
$(EASK) ert ./test/*.el
checkdoc:
@echo "Run checkdoc..."
$(EASK) checkdoc
lint:
@echo "Run package-lint..."
$(EASK) lint
clean:
$(EASK) clean-all

View File

@@ -34,7 +34,7 @@
(require 'eww)
(require 'gdscript-customization)
(defun gdscript-docs-open (url &optional)
(defun gdscript-docs-open (url &args _)
"when `gdscript-docs-use-eww' is true use `eww' else use `browse-url'"
(if gdscript-docs-use-eww
(if (file-exists-p url) (eww-open-file url) (eww-browse-url url t))