aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.emacs.d/test-emacs.sh5
-rw-r--r--.travis.yml54
-rw-r--r--Makefile22
3 files changed, 45 insertions, 36 deletions
diff --git a/.emacs.d/test-emacs.sh b/.emacs.d/test-emacs.sh
index 37e0c75..12a8b70 100755
--- a/.emacs.d/test-emacs.sh
+++ b/.emacs.d/test-emacs.sh
@@ -26,6 +26,11 @@ for i in . lisp; do
# shellcheck disable=SC2086
${EMACS:=emacs} -Q --batch ${LOAD_PATH} -l elisp-lint.el -f elisp-lint-files-batch $files
+
+ # God knows why this is needed, but `package-lint` bails otherwise...
+ mkdir -p vendor/data
+ echo "()" > vendor/data/stdlib-changes
+
# shellcheck disable=SC2086
${EMACS:=emacs} -Q --batch ${LOAD_PATH} -l package-lint.el -f package-lint-batch-and-exit $files
done
diff --git a/.travis.yml b/.travis.yml
index 53afa2a..5d9247c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,13 +1,10 @@
-# The procedure for testing GNU Emacs was kindly taken from:
-# https://github.com/purcell/emacs.d
+language: nix
-dist: trusty
-language: ruby
-
-before_install:
- - git clone https://github.com/rejeep/evm.git $HOME/.evm
- - export PATH=$HOME/.evm/bin:$PATH
+env:
+ - EMACS_CI=emacs-26-3
+ - EMACS_CI=emacs-snapshot
+install:
# mu4e
- sudo apt-get -qq update
- sudo apt-get install -y maildir-utils
@@ -17,37 +14,22 @@ before_install:
- sudo cp -r mu-1.0/mu4e /usr/share/emacs/site-lisp/
- popd
- - evm config path /tmp
- - evm install $EVM_EMACS --use --skip
-
- # shellcheck
- - sudo apt-get install -y shellcheck
+ # GNU Emacs itself through nix.
+ - bash <(curl https://raw.githubusercontent.com/purcell/nix-emacs-ci/master/travis-install)
- # rubocop
- - gem install rubocop
-
-env:
- - EVM_EMACS=emacs-25.3-travis
- - EVM_EMACS=emacs-26.1-travis
- # GNU Emacs 26.2 refuses to work on Travis because of the bug on fetching
- # elpa.gnu.org. It works locally for me.
- - EVM_EMACS=emacs-git-snapshot-travis
-
-matrix:
- allow_failures:
- - env: EVM_EMACS=emacs-git-snapshot-travis
-
-script:
- # Testing GNU Emacs
+ # Install the soria theme, which has been previously downloaded.
- git clone https://github.com/mssola/soria.git
- cp soria/soria-theme.el .emacs.d/soria-theme.el
- - lsb_release -a && cd .emacs.d && ./test-emacs.sh
- # Testing scripts
- - cd ../bin/test && ./test.sh
+ # writer-mode
+ - mkdir -p $HOME/src/github.com/mssola/
+ - cd $HOME/src/github.com/mssola/
+ - git clone https://github.com/mssola/writer-mode.git
- # Shellcheck
- - cd ../.. && find . -name "*.sh" ! -name ".gitcompletion.sh" ! -name ".hgcompletion.sh" -not -path "./.emacs.d/*" -exec shellcheck \{\} \+
+ # Linters: shellcheck (shell) and rubocop (ruby).
+ - sudo apt-get install -y shellcheck ruby
+ - gem install rubocop
- # Ruby style
- - rubocop
+script:
+ - cd $TRAVIS_BUILD_DIR
+ - make test
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..e8220ae
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+all: test
+
+.PHONY: test
+test: vendor emacs scripts lint
+
+.PHONY: vendor
+vendor:
+ @gem install rubocop
+
+.PHONY: emacs
+emacs:
+ @lsb_release -a
+ @cd .emacs.d && ./test-emacs.sh
+
+.PHONY: scripts
+scripts:
+ @cd bin/test && ./test.sh
+
+.PHONY: lint
+lint:
+ @find . -name "*.sh" ! -name ".gitcompletion.sh" ! -name ".hgcompletion.sh" -not -path "./.emacs.d/*" -exec shellcheck \{\} \+
+ @rubocop