Skip to content

Commit

Permalink
Merge pull request #3 from purcell/add-ci
Browse files Browse the repository at this point in the history
Add simple CI
  • Loading branch information
purcell authored Oct 23, 2024
2 parents 2941094 + 7d2060a commit d36443c
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
commit-message:
prefix: "chore"
include: "scope"
46 changes: 46 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
pull_request:
push:
paths-ignore:
- '**.md'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: purcell/setup-emacs@master
with:
version: 29.1
- uses: actions/checkout@v4
- name: Run tests
run: make package-lint

build:
runs-on: ubuntu-latest
strategy:
matrix:
emacs_version:
- 24.3
- 24.5
- 25.1
- 25.3
- 26.1
- 26.3
- 27.1
- 27.2
- 28.1
- 28.2
- 29.1
- snapshot
steps:
- uses: cachix/install-nix-action@V27
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: purcell/setup-emacs@master
with:
version: ${{ matrix.emacs_version }}
- uses: actions/checkout@v4
- name: Run tests
run: make compile
28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
EMACS ?= emacs

# A space-separated list of required package names
DEPS =

INIT_PACKAGES="(progn \
(require 'package) \
(push '(\"melpa\" . \"https://melpa.org/packages/\") package-archives) \
(package-initialize) \
(dolist (pkg '(PACKAGES)) \
(unless (package-installed-p pkg) \
(unless (assoc pkg package-archive-contents) \
(package-refresh-contents)) \
(package-install pkg))) \
)"

all: compile package-lint test clean-elc

package-lint:
${EMACS} -Q --eval $(subst PACKAGES,package-lint,${INIT_PACKAGES}) -batch -f package-lint-batch-and-exit windswap.el

compile: clean-elc
${EMACS} -Q --eval $(subst PACKAGES,${DEPS},${INIT_PACKAGES}) -L . -batch -f batch-byte-compile *.el

clean-elc:
rm -f f.elc

.PHONY: all compile clean-elc package-lint
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Melpa Status](http://melpa.org/packages/windswap-badge.svg)](http://melpa.org/#/windswap)
[![Melpa Stable Status](http://stable.melpa.org/packages/windswap-badge.svg)](http://stable.melpa.org/#/windswap)
[![Build Status](https://github.com/purcell/windswap/actions/workflows/test.yml/badge.svg)](https://github.com/purcell/windswap/actions/workflows/test.yml)
<a href="https://www.patreon.com/sanityinc"><img alt="Support me" src="https://img.shields.io/badge/Support%20Me-%F0%9F%92%97-ff69b4.svg"></a>

# Swap Emacs windows with their neighbours
Expand Down

0 comments on commit d36443c

Please sign in to comment.