Skip to content

Commit

Permalink
Try to use Cask for testing on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
alphapapa committed Aug 23, 2017
1 parent 3f97e5c commit a4973de
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Expand Up @@ -8,6 +8,11 @@ before_install:

- evm config path /tmp
- evm install $EVM_EMACS --use --skip

# Use cask to install development dependencies
- curl -fsSkL https://raw.github.com/cask/cask/master/go | python
- export PATH=$HOME/.cask/bin:$PATH
- cask

env:
# - EVM_EMACS=emacs-24.1-travis EMACS_LINT_IGNORE=1
Expand All @@ -18,13 +23,13 @@ env:
- EVM_EMACS=emacs-25.1-travis
- EVM_EMACS=emacs-25.2-travis
- EVM_EMACS=emacs-git-snapshot-travis

matrix:
allow_failures:
- env: EVM_EMACS=emacs-git-snapshot-travis

script:
lsb_release -a && test/run --debug
cask exec test/run --debug

# Local Variables:
# indent-tabs-mode: nil
Expand Down
10 changes: 10 additions & 0 deletions Cask
@@ -0,0 +1,10 @@
(source gnu)
(source melpa)

(package-file "org-super-agenda.el")

(development
(depends-on "f")
(depends-on "ecukes")
(depends-on "ert-runner")
(depends-on "el-mock"))
41 changes: 13 additions & 28 deletions test/run
Expand Up @@ -28,19 +28,19 @@ INIT_PACKAGE_EL="(progn
(package-refresh-contents)
(setq debug-on-error t))"

PACKAGES_NEEDED="
(cl-loop for package in '(ht f s dash)
unless (package-installed-p package)
do (package-install package))"

# Since package-install refuses to install a package that's already
# installed, and package-reinstall can't delete the built-in Org
# package, we have to fool it into thinking Org isn't installed by
# binding package--builtins and package--builtin-versions to nil.
UPDATE_ORG_IF_NEEDED="
(unless (version<= \"9.0\" (org-version))
(let (package--builtins package--builtin-versions)
(package-install 'org)))"
# PACKAGES_NEEDED="
# (cl-loop for package in '(ht f s dash)
# unless (package-installed-p package)
# do (package-install package))"

# # Since package-install refuses to install a package that's already
# # installed, and package-reinstall can't delete the built-in Org
# # package, we have to fool it into thinking Org isn't installed by
# # binding package--builtins and package--builtin-versions to nil.
# UPDATE_ORG_IF_NEEDED="
# (unless (version<= \"9.0\" (org-version))
# (let (package--builtins package--builtin-versions)
# (package-install 'org)))"

# Workaround weird indentation bug in Emacs shell-script-mode. It
# sees the single-quotes in the vars above and thinks that there is an
Expand Down Expand Up @@ -120,8 +120,6 @@ function lint {
}

function run_tests {
update_org

debug "TESTING..."

"$EMACS" -Q -batch \
Expand All @@ -132,19 +130,6 @@ function run_tests {
-f ert-run-tests-batch-and-exit
}

function update_org {
# Make sure Org 9.0+ is installed

debug "Updating Org..."

"$EMACS" -Q -batch \
--eval "$INIT_PACKAGE_EL" \
--eval "$PACKAGES_NEEDED" \
--eval "(message \"Org version: %s\" (org-version))" \
--eval "$UPDATE_ORG_IF_NEEDED" \
--eval "(message \"Org version: %s\" (org-version))"
}

function update {
debug "UPDATING..."

Expand Down

0 comments on commit a4973de

Please sign in to comment.