Skip to content

Switch from travis ci to github actions #466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
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
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

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
ERT_RUNNER_ARGS:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instead of adding this here, the tests should not try to read this environment variable


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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
/.cask/
/dist/
*-emacs-elixir-format.ex

# Added automatically by `eldev init'.
/.eldev
/Eldev-local
6 changes: 6 additions & 0 deletions Eldev
Original file line number Diff line number Diff line change
@@ -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)
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 "24") (pkg-info "0.4") (s "1.2.0"))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since s is only used for tests this should be changed so it's not a general requirement of the package. Unfortunately I wasn't able to find any information on how to accomplish that

Copy link
Contributor

Choose a reason for hiding this comment

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


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

Expand Down
2 changes: 2 additions & 0 deletions test/elixir-mode-indentation-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

;;; Code:

(require 'test/test-helper)

(elixir-def-indentation-test indent-use-dot-module-newline
(:tags '(indentation))
"
Expand Down
1 change: 1 addition & 0 deletions test/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