From 09fe703d0707c86d50a0b014117c9701ac67ec6c Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sat, 28 Nov 2020 11:22:26 -1000 Subject: [PATCH 1/6] Add github ci workflow --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..c21ab9d3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +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: + # Add more lines like this if you want to test on different Emacs versions. + - 27.1 + - 26.3 + - 26.1 + - 25.2 + - 25.1 + include: + - elixir: 1.8.x + otp: 21.3.8.18 + - elixir: 1.9.x + otp: 21.3.8.18 + - elixir: 1.10.x + otp: 21.3.8.18 + - elixir: 1.11.x + otp: 21.3.8.18 + - elixir: 1.11.x + otp: 23.1.4 + env: + MIX_ENV: test + + steps: + - name: Set up Emacs + uses: purcell/setup-emacs@master + with: + version: ${{matrix.emacs_version}} + + - 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 prepare + eldev -p -dtT test From 84d30edde1925da311fe828c4e3f9e52c599925b Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sat, 28 Nov 2020 11:24:51 -1000 Subject: [PATCH 2/6] Update triggers --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c21ab9d3..52a68ba1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,13 @@ name: CI on: push: + branches: + - master paths-ignore: - '**.md' pull_request: + branches: + - master paths-ignore: - '**.md' From 97af15dcdf72e67c54d11a1758fce660a6794957 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sat, 28 Nov 2020 11:28:07 -1000 Subject: [PATCH 3/6] Update triggers again --- .github/workflows/ci.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52a68ba1..8109e54b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,15 +2,12 @@ name: CI on: push: - branches: - - master - paths-ignore: - - '**.md' + branches: [ master ] pull_request: - branches: - - master - paths-ignore: - - '**.md' + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: jobs: test: From 6d67f159d42b8b919d4da4fdbcf2640241d0ec66 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sat, 28 Nov 2020 13:38:23 -1000 Subject: [PATCH 4/6] add code from `eldev init` --- .gitignore | 4 ++++ Eldev | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 Eldev diff --git a/.gitignore b/.gitignore index 8b647d60..184d485f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,7 @@ /.cask/ /dist/ *-emacs-elixir-format.ex + +# Added automatically by `eldev init'. +/.eldev +/Eldev-local diff --git a/Eldev b/Eldev new file mode 100644 index 00000000..bdeb0a00 --- /dev/null +++ b/Eldev @@ -0,0 +1,6 @@ +; -*- mode: emacs-lisp; lexical-binding: t; no-byte-compile: t -*- + +;; Autodetermined by `eldev init'. +(eldev-use-package-archive 'melpa) + +(eldev-use-plugin 'autoloads) From 1bf18d22947301ef7e67ca60a5ffa3dcec677e63 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sat, 28 Nov 2020 14:11:51 -1000 Subject: [PATCH 5/6] Some test setup fixes --- elixir-mode.el | 2 +- test/elixir-mode-indentation-test.el | 2 ++ test/test-helper.el | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/elixir-mode.el b/elixir-mode.el index 66a101ac..66eba09d 100644 --- a/elixir-mode.el +++ b/elixir-mode.el @@ -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 "24") (pkg-info "0.4") (s "1.2.0")) ;; This file is not a part of GNU Emacs. diff --git a/test/elixir-mode-indentation-test.el b/test/elixir-mode-indentation-test.el index 05d1751a..d0089f7f 100644 --- a/test/elixir-mode-indentation-test.el +++ b/test/elixir-mode-indentation-test.el @@ -9,6 +9,8 @@ ;;; Code: +(require 'test/test-helper) + (elixir-def-indentation-test indent-use-dot-module-newline (:tags '(indentation)) " diff --git a/test/test-helper.el b/test/test-helper.el index d108e721..36ef5480 100644 --- a/test/test-helper.el +++ b/test/test-helper.el @@ -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) From 7cb6a963ba1c14aaa8df687bf0bf6f376d4799f4 Mon Sep 17 00:00:00 2001 From: Jason Axelson Date: Sat, 28 Nov 2020 14:14:54 -1000 Subject: [PATCH 6/6] Add ert runner args env var --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8109e54b..637969a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,7 @@ jobs: otp: 23.1.4 env: MIX_ENV: test + ERT_RUNNER_ARGS: steps: - name: Set up Emacs