Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .ert-runner

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

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

jobs:
test:
name: mix test (Emacs ${{matrix.emacs_version}} | Elixir ${{matrix.elixir}} | Erlang/OTP ${{matrix.otp}})
runs-on: ubuntu-latest
strategy:
matrix:
emacs_version: ['27.1', '26.3', '25.2']
otp: ['21.3', '23.2']
elixir: ['1.8.2', '1.11.4']

steps:
- name: Setup Emacs
uses: purcell/setup-emacs@master
with:
version: ${{matrix.emacs_version}}

- name: Setup OTP + Elixir
uses: erlef/setup-elixir@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}

- name: Install Eldev
run: curl -fsSL https://raw.github.com/doublep/eldev/master/webinstall/github-eldev | sh

- name: Check out the source code
uses: actions/checkout@v2

- name: Test the project
run: |
eldev -p -dtT test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@
/.cask/
/dist/
*-emacs-elixir-format.ex
elixir-mode-autoloads.el

# Added automatically by ‘eldev init’.
/.eldev
/Eldev-local

24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

9 changes: 0 additions & 9 deletions Cask

This file was deleted.

11 changes: 11 additions & 0 deletions Eldev
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
; -*- mode: emacs-lisp; lexical-binding: t; no-byte-compile: t -*-

;; Autodetermined by `eldev init'.
(eldev-use-package-archive 'melpa)

(eldev-use-plugin 'autoloads)
(eldev-use-plugin 'undercover)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to send statistics to coveralls or something with this. Related docs: https://github.com/doublep/eldev#undercover-plugin

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. That can probably be handled in a new PR.


(eldev-add-loading-roots 'test "tests")

(eldev-add-extra-dependencies 'test 's)
2 changes: 1 addition & 1 deletion elixir-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
;; Created: Mon Nov 7 2011
;; Keywords: languages elixir
;; Version: 2.4.0
;; Package-Requires: ((emacs "24") (pkg-info "0.4"))
;; Package-Requires: ((emacs "25") (pkg-info "0.6"))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in other discussions, I've bumped from 24 to 25.


;; This file is not a part of GNU Emacs.

Expand Down
1 change: 1 addition & 0 deletions test/elixir-format-test.el → tests/elixir-format-test.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
;;; elixir-format-test.el --- Basic tests for elixir-format

;;; Code:
(require 'test-helper)

(ert-deftest elixir-format-indents-a-buffer ()
(when elixir-formatter-supported
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
;; https://github.com/lunaryorn/puppet-mode/blob/master/test/puppet-mode-test.el

;;; Code:
(require 'test-helper)

(defun elixir-test-face-at (pos &optional content)
"Get the face at POS in CONTENT.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
;;; elixir-mode-helper-test.el --- Tests for helper functions

;;; Code:
(require 'test-helper)

(ert-deftest check-if-currently-inside-heredoc ()
(should (with-temp-buffer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
;; passes.

;;; Code:
(require 'test-helper)

(elixir-def-indentation-test indent-use-dot-module-newline
(:tags '(indentation))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
;;; elixir-mode-moving-test.el --- Tests for moving cursor functions

;;; Code:
(require 'test-helper)

(ert-deftest beginning-of-defun ()
:tags '(moving)
Expand Down
6 changes: 2 additions & 4 deletions test/test-helper.el → tests/test-helper.el
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

(require 'ert-x) ; `ert-with-test-buffer'
(require 'cl-lib) ; `cl-defmacro'
(require 's)

(message "Running tests on Emacs %s" emacs-version)

Expand Down Expand Up @@ -62,10 +63,6 @@
(insert indented)
(should (equal indented ,expected-output)))))))

(when (s-contains? "--win" (getenv "ERT_RUNNER_ARGS"))
(defun ert-runner/run-tests-batch-and-exit (selector)
(ert-run-tests-interactively selector)))

(setq elixir-format-elixir-path (executable-find "elixir"))
(setq elixir-format-mix-path (executable-find "mix"))

Expand Down Expand Up @@ -100,4 +97,5 @@ end")
end
")

(provide 'test-helper)
;;; test-helper.el ends here