diff --git a/.dir-locals.el b/.dir-locals.el index 1938ca4..47674e1 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -2,4 +2,5 @@ ;;; For more information see (info "(emacs) Directory Variables") ((emacs-lisp-mode . ((sentence-end-double-space . t) - (indent-tabs-mode . nil)))) + (indent-tabs-mode . nil))) + (makefile-mode . ((indent-tabs-mode . t)))) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..607de94 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + branches: + - master + - main + pull_request: + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + # for some reason, Windows cannot connect to Melpa on + # Emacs 27, so no Windows + emacs-version: + - 26.1 + - 26.2 + - 26.3 + - 27.1 + - 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: '16' + + - uses: emacs-eask/setup-eask@master + with: + version: 'snapshot' + + - name: Run tests + run: + make ci diff --git a/Eask b/Eask new file mode 100644 index 0000000..380ea63 --- /dev/null +++ b/Eask @@ -0,0 +1,13 @@ +(package "org-unique-id" + "0.3.0" + "Create unique IDs for org headers") + +(website-url "https://labs.phundrak.com/phundrak/org-unique-id") +(keywords "convenience") + +(package-file "org-unique-id.el") + +(source "gnu") + +(depends-on "emacs" "26.1") +(depends-on "org" "9.5") diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b077912 --- /dev/null +++ b/Makefile @@ -0,0 +1,62 @@ +EMACS ?= emacs +EASK ?= eask + +.PHONY: clean package install compile test checkdoc lint + +# CI entry point +ci: clean package install compile checkdoc lint + +# 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: + @echo "Linting..." + $(EASK) lint package + +# Clean up +# +# This will clean all the entire workspace including the following folders +# and files +# +# - .eask folder (sandbox) +# - all .elc files +clean: + $(EASK) clean-all