chore: switch to Eask for package testing
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit removes some files that are no longer needed for testing the package, such as the files in the ./test directory which are already covered by Eask itself. BREAKING CHANGE: test files no longer exists
This commit is contained in:
parent
86f211ba50
commit
d851c7de92
11
.build.yml
11
.build.yml
@ -1,11 +0,0 @@
|
|||||||
image: alpine/edge
|
|
||||||
packages:
|
|
||||||
- emacs
|
|
||||||
- make
|
|
||||||
sources:
|
|
||||||
- https://git.sr.ht/~abrahms/ox-gemini
|
|
||||||
tasks:
|
|
||||||
- build: |
|
|
||||||
cd ox-gemini
|
|
||||||
make update
|
|
||||||
make compile
|
|
75
.drone.yml
Normal file
75
.drone.yml
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: emacs 26
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: tests
|
||||||
|
image: silex/emacs:26-alpine
|
||||||
|
commands:
|
||||||
|
- apk add npm make
|
||||||
|
- npm install -g @emacs-eask/cli
|
||||||
|
- make clean
|
||||||
|
- make package
|
||||||
|
- make install
|
||||||
|
- make compile
|
||||||
|
- make checkdoc
|
||||||
|
- make lint
|
||||||
|
- make clean
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: emacs 27
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: tests
|
||||||
|
image: silex/emacs:27-alpine
|
||||||
|
commands:
|
||||||
|
- apk add npm make
|
||||||
|
- npm install -g @emacs-eask/cli
|
||||||
|
- make clean
|
||||||
|
- make package
|
||||||
|
- make install
|
||||||
|
- make compile
|
||||||
|
- make checkdoc
|
||||||
|
- make lint
|
||||||
|
- make clean
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: emacs 28
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: tests
|
||||||
|
image: silex/emacs:28-alpine
|
||||||
|
commands:
|
||||||
|
- apk add npm make
|
||||||
|
- npm install -g @emacs-eask/cli
|
||||||
|
- make clean
|
||||||
|
- make package
|
||||||
|
- make install
|
||||||
|
- make compile
|
||||||
|
- make checkdoc
|
||||||
|
- make lint
|
||||||
|
- make clean
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: emacs master
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: tests
|
||||||
|
image: silex/emacs:master-alpine
|
||||||
|
commands:
|
||||||
|
- apk add npm make
|
||||||
|
- npm install -g @emacs-eask/cli
|
||||||
|
- make clean
|
||||||
|
- make package
|
||||||
|
- make install
|
||||||
|
- make compile
|
||||||
|
- make checkdoc
|
||||||
|
- make lint
|
||||||
|
- make clean
|
17
.gitignore
vendored
17
.gitignore
vendored
@ -1,2 +1,17 @@
|
|||||||
|
# ignore these directories
|
||||||
|
/.git
|
||||||
|
/recipes
|
||||||
|
|
||||||
|
# ignore log files
|
||||||
|
/.log
|
||||||
|
|
||||||
|
# ignore generated files
|
||||||
*.elc
|
*.elc
|
||||||
.elpa/
|
|
||||||
|
# eask packages
|
||||||
|
.eask/
|
||||||
|
dist/
|
||||||
|
|
||||||
|
# packaging
|
||||||
|
*-autoloads.el
|
||||||
|
*-pkg.el
|
||||||
|
14
Eask
Normal file
14
Eask
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
(package "ox-gemini"
|
||||||
|
"0.2.0"
|
||||||
|
"Output gemini formatted documents from org-mode")
|
||||||
|
|
||||||
|
(website-url "https://labs.phundrak.com/phundrak/ox-gemini")
|
||||||
|
(keywords "lisp" "org-mode")
|
||||||
|
|
||||||
|
(package-file "ox-gemini.el")
|
||||||
|
|
||||||
|
(script "test" "echo \"Error: no test specified\" && exit 1")
|
||||||
|
|
||||||
|
(source "gnu")
|
||||||
|
|
||||||
|
(depends-on "emacs" "26.1")
|
70
Makefile
70
Makefile
@ -1,16 +1,64 @@
|
|||||||
EMACS = emacs
|
EMACS ?= emacs
|
||||||
|
EASK ?= eask
|
||||||
|
|
||||||
compile: clean lint
|
.PHONY: clean package install compile test checkdoc lint
|
||||||
${EMACS} --version
|
|
||||||
${EMACS} -batch -l test/elpa.el -l test/compile.el
|
|
||||||
|
|
||||||
clean:
|
# (Option 1): Basic for beginner, only tests for package's installation
|
||||||
rm -f *.elc
|
ci: clean package install compile
|
||||||
|
# (Option 2): Advanced for a high-quality package
|
||||||
|
#ci: clean package install compile checkdoc lint test
|
||||||
|
|
||||||
|
# Build an package artefact, default to `dist` folder
|
||||||
|
#
|
||||||
|
# This is used to test if your package can be built correctly before the
|
||||||
|
# package installation.
|
||||||
|
package:
|
||||||
|
@echo "Packaging..."
|
||||||
|
$(EASK) package
|
||||||
|
|
||||||
|
# Install package
|
||||||
|
#
|
||||||
|
# If your package is a single file package, you generally wouldn't need to
|
||||||
|
install:
|
||||||
|
@echo "Installing..."
|
||||||
|
$(EASK) install
|
||||||
|
|
||||||
|
# Byte-compile package
|
||||||
|
#
|
||||||
|
# Compile all your package .el files to .elc
|
||||||
|
compile:
|
||||||
|
@echo "Compiling..."
|
||||||
|
$(EASK) compile
|
||||||
|
|
||||||
|
# Run regression tests
|
||||||
|
#
|
||||||
|
# The default test is `ert`; but Eask also support other regression test!
|
||||||
|
# See https://emacs-eask.github.io/Getting-Started/Commands-and-options/#-linter
|
||||||
|
test:
|
||||||
|
@echo "Testing..."
|
||||||
|
$(EASK) install-deps --dev
|
||||||
|
$(EASK) test ert ./test/*.el
|
||||||
|
|
||||||
|
# Run checkdoc
|
||||||
|
#
|
||||||
|
# See https://www.emacswiki.org/emacs/CheckDoc
|
||||||
|
checkdoc:
|
||||||
|
@echo "Checking documentation..."
|
||||||
|
$(EASK) lint checkdoc --strict
|
||||||
|
|
||||||
|
# Lint package metadata
|
||||||
|
#
|
||||||
|
# See https://github.com/purcell/package-lint
|
||||||
lint:
|
lint:
|
||||||
${EMACS} --batch -l test/lint.el
|
@echo "Linting..."
|
||||||
|
$(EASK) lint package
|
||||||
|
|
||||||
update:
|
# Clean up
|
||||||
${EMACS} -batch -l test/make-update.el
|
#
|
||||||
|
# This will clean all the entire workspace including the following folders
|
||||||
.PHONY: update compile test clean
|
# and files
|
||||||
|
#
|
||||||
|
# - .eask folder (sandbox)
|
||||||
|
# - all .elc files
|
||||||
|
clean:
|
||||||
|
$(EASK) clean all
|
||||||
|
@ -16,5 +16,8 @@ gemini links as described in commit [[https://labs.phundrak.com/phundrak/ox-gemi
|
|||||||
|
|
||||||
TODOs formerly in =ox-gemini.el= have also been moved to issues.
|
TODOs formerly in =ox-gemini.el= have also been moved to issues.
|
||||||
|
|
||||||
|
** Eask
|
||||||
|
This project is managed with [[https://github.com/emacs-eask/cli][Eask]].
|
||||||
|
|
||||||
* License
|
* License
|
||||||
This software is licensed under GPLv3.
|
This software is licensed under GPLv3.
|
||||||
|
24
ox-gemini.el
24
ox-gemini.el
@ -1,12 +1,27 @@
|
|||||||
;;; ox-gemini.el --- Output gemini formatted documents from org-mode -*- lexical-binding: t; -*-
|
;;; ox-gemini.el --- Output gemini formatted documents from org-mode -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;; Author: Justin Abrahms <justin@abrah.ms>
|
;; Author: Justin Abrahms <justin@abrah.ms>
|
||||||
;; URL: https://git.sr.ht/~abrahms/ox-gemini
|
;; Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com>
|
||||||
;; Keywords: lisp gemini
|
;; URL: https://labs.phundrak.com/phundrak/ox-gemini
|
||||||
;; Version: 0
|
;; Version: 0.2.0
|
||||||
|
;; Keywords: lisp org-mode
|
||||||
;; Package-Requires: ((emacs "26.1"))
|
;; Package-Requires: ((emacs "26.1"))
|
||||||
;; SPDX-License-Identifier: GPL-3.0-or-later
|
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
;; This file is not part of GNU Emacs.
|
||||||
|
|
||||||
|
;; This program is free software: you can redistribute it and/or modify
|
||||||
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
|
||||||
|
;; This program is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;; GNU General Public License for more details.
|
||||||
|
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;
|
;;
|
||||||
@ -103,7 +118,8 @@ INFO is a plist."
|
|||||||
(concat (file-name-sans-extension (org-element-property :path link)) ".gmi")
|
(concat (file-name-sans-extension (org-element-property :path link)) ".gmi")
|
||||||
raw-path))
|
raw-path))
|
||||||
(desc (org-element-contents link))
|
(desc (org-element-contents link))
|
||||||
(anchor (string-replace "\n" " "
|
(anchor (replace-regexp-in-string (regexp-quote "\n")
|
||||||
|
" "
|
||||||
(org-export-data
|
(org-export-data
|
||||||
(or desc (org-element-property :raw-link link))
|
(or desc (org-element-property :raw-link link))
|
||||||
info))))
|
info))))
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
;; bail out on compilation warnings and errors
|
|
||||||
(setq byte-compile-error-on-warn t)
|
|
||||||
(setq byte-compile--use-old-handlers nil)
|
|
||||||
|
|
||||||
;; compile *.el files
|
|
||||||
(dolist (file (file-expand-wildcards "*.el"))
|
|
||||||
(unless (byte-compile-file file)
|
|
||||||
(kill-emacs 1)))
|
|
@ -1,4 +0,0 @@
|
|||||||
(setq package-user-dir
|
|
||||||
(expand-file-name (format ".elpa/%s/elpa" emacs-version)))
|
|
||||||
(package-initialize)
|
|
||||||
(add-to-list 'load-path default-directory)
|
|
16
test/lint.el
16
test/lint.el
@ -1,16 +0,0 @@
|
|||||||
(message "Emacs version: %s" emacs-version)
|
|
||||||
|
|
||||||
(dolist (file (file-expand-wildcards "*.el"))
|
|
||||||
(let ((checkdoc-diagnostic-buffer "*warn*")
|
|
||||||
;; bail out on checkdoc warnings
|
|
||||||
(checkdoc-create-error-function (lambda (text start end &optional unfixable)
|
|
||||||
(message "%s:%s %s"
|
|
||||||
file
|
|
||||||
(line-number-at-pos start)
|
|
||||||
text)
|
|
||||||
(kill-emacs 1))))
|
|
||||||
(with-current-buffer (find-file-noselect file)
|
|
||||||
;; Eval the buffer first because otherwise checkdoc isn't smart
|
|
||||||
;; enough to recognize that some symbols are defined.
|
|
||||||
(eval-buffer)
|
|
||||||
(checkdoc-current-buffer t))))
|
|
@ -1,28 +0,0 @@
|
|||||||
;; list of the all the dependencies, including the dev dependencies
|
|
||||||
(defvar dev-packages '(evil evil-test-helpers))
|
|
||||||
|
|
||||||
;; initialize package.el
|
|
||||||
(setq package-user-dir
|
|
||||||
(expand-file-name (format ".elpa/%s/elpa" emacs-version)))
|
|
||||||
(message "installing in %s ...\n" package-user-dir)
|
|
||||||
(package-initialize)
|
|
||||||
(setq package-archives
|
|
||||||
'(("melpa" . "http://melpa.org/packages/")
|
|
||||||
("gnu" . "http://elpa.gnu.org/packages/")))
|
|
||||||
(package-refresh-contents)
|
|
||||||
|
|
||||||
;; install dependencies
|
|
||||||
(dolist (package dev-packages)
|
|
||||||
(unless (package-installed-p package)
|
|
||||||
(ignore-errors
|
|
||||||
(package-install package))))
|
|
||||||
|
|
||||||
;; upgrade dependencies
|
|
||||||
(save-window-excursion
|
|
||||||
(package-list-packages t)
|
|
||||||
(condition-case nil
|
|
||||||
(progn
|
|
||||||
(package-menu-mark-upgrades)
|
|
||||||
(package-menu-execute t))
|
|
||||||
(error
|
|
||||||
(message "All packages up to date"))))
|
|
Loading…
Reference in New Issue
Block a user