Skip to content

Commit

Permalink
ci: Switch to GitHub Actions
Browse files Browse the repository at this point in the history
After GitHub Actions were available, this repository kept using Travis
because it worked well enough, especially given this package is very
much in maintenance mode.  However, going forward it'd be nice to use
purcell/setup-emacs action to test various Emacs versions.

Don't bother testing against Emacs 24 because the next release will
bump the minimum Emacs version to at least 25.1.

While touching this setup, drop the Makefile target for downloading
dependencies and instead just expect dependencies to be one level up
from the snakemake-mode checkout.
  • Loading branch information
kyleam committed Feb 21, 2022
1 parent e735ccc commit c657cfa
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 48 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: test
on: push
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
emacs_version:
- 25.3
- 27.2
- snapshot
steps:
- name: Install emacs
uses: purcell/setup-emacs@master
with:
version: ${{ matrix.emacs_version }}
- name: Check out dash
uses: actions/checkout@v2
with:
repository: magnars/dash.el
path: dash.el
- name: Check out magit-popup
uses: actions/checkout@v2
with:
repository: magit/magit-popup
path: magit-popup
- name: Check out snakemake-mode
uses: actions/checkout@v2
with:
repository: kyleam/snakemake-mode
path: snakemake-mode
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install Snakemake
run: |
python -m pip install --upgrade pip
pip install snakemake
- name: Build snakemake-mode
run: make -C snakemake-mode all
- name: Test snaekmake-mode
run: make -C snakemake-mode test
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

18 changes: 3 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

LOAD_PATH = -L .deps -L .
LOAD_PATH = -L ../magit-popup -L ../dash.el -L .
EMACS = emacs
BATCH = $(EMACS) -Q --batch $(LOAD_PATH)
CURL := curl --silent
Expand All @@ -8,14 +8,11 @@ els := snakemake.el snakemake-mode.el
elcs := $(patsubst %.el, %.elc, $(els))
AUTOLOADS_FILE = snakemake-autoloads.el

DASH_URL := https://raw.githubusercontent.com/magnars/dash.el/master/dash.el
POPUP_URL := https://raw.githubusercontent.com/magit/magit-popup/master/magit-popup.el

.PHONY: all
all: $(elcs) $(AUTOLOADS_FILE)

.PHONY: test
test: | .deps
test:
@$(BATCH) -l snakemake-test \
--eval "(ert-run-tests-batch-and-exit '(not (tag interactive)))"

Expand All @@ -25,18 +22,9 @@ $(AUTOLOADS_FILE): $(els)
(generated-autoload-file \"$(CURDIR)/$@\")) \
(update-directory-autoloads \"$(CURDIR)/\"))"

.deps:
mkdir -p .deps
$(CURL) $(DASH_URL) > .deps/dash.el
$(CURL) $(POPUP_URL) > .deps/magit-popup.el

%.elc: %.el | .deps
%.elc: %.el
@$(BATCH) -f batch-byte-compile $<

.PHONY: clean
clean:
$(RM) $(elcs) $(AUTOLOADS_FILE)

.PHONY: clean-all
clean-all: clean
$(RM) -r .deps

0 comments on commit c657cfa

Please sign in to comment.