Permalink
Browse files

Travics-CI support: Added .travis.yml and adjusted the test setups.

This should integrate us with Travis-CI.

Adapted from magnars:
https://github.com/magnars/multiple-cursors.el/blob/master/.travis.yml
  • Loading branch information...
1 parent 416aa07 commit 350611260d8e84ca480bc8cfde7ff06d7781b092 @jorgenschaefer committed Feb 24, 2013
Showing with 53 additions and 1 deletion.
  1. +23 −0 .travis.yml
  2. +16 −0 elpy-tests.el
  3. +5 −1 test.sh → test-local.sh
  4. +9 −0 test-travis.sh
View
@@ -0,0 +1,23 @@
+language: python
+before_install:
+ - if [ "$EMACS" = 'emacs-snapshot' ]; then
+ sudo add-apt-repository -y ppa:cassou/emacs &&
+ sudo apt-get update -qq &&
+ sudo apt-get install -qq
+ emacs-snapshot-el emacs-snapshot-gtk emacs-snapshot;
+ fi
+ - if [ "$EMACS" = 'emacs24' ]; then
+ sudo add-apt-repository -y ppa:cassou/emacs &&
+ sudo apt-get update -qq &&
+ sudo apt-get install -qq
+ emacs24 emacs24-el emacs24-common-non-dfsg;
+ fi
+install:
+ - "pip install nose rope jedi --use-mirrors"
+python:
+ - "2.7"
+env:
+ - EMACS=emacs24
+ - EMACS=emacs-snapshot
+script:
+ ./test-travis.sh
View
@@ -72,6 +72,22 @@ project root of an empty directory."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The actual tests now
+(require 'package)
+
+(add-to-list 'package-archives
+ '("marmalade" . "http://marmalade-repo.org/packages/"))
+
+(package-initialize t)
+(package-refresh-contents)
+
+(dolist (pkg (with-temp-buffer
+ (insert-file-contents-literally "elpy-pkg.el.in")
+ (goto-char (point-min))
+ (let ((define-package (read (current-buffer))))
+ (cadr (nth 4 define-package)))))
+ (when (not (package-installed-p (car pkg)))
+ (package-install (car pkg))))
+
(package-initialize)
(require 'elpy)
@@ -8,10 +8,14 @@ fi
set -ex
+find -name '*.pyc' -o -name '*.elc' -exec rm {} +
+
nosetests
-for EMACS in ~/Programs/emacsen/*24*/src/emacs ~/Programs/Emacs/src/emacs
+for EMACS in ~/Programs/emacsen/*24*/src/emacs \
+ ~/Programs/Emacs/src/emacs
do
+ $EMACS --version
$EMACS -q -batch -L `pwd` -l ert -l elpy-tests.el \
-f ert-run-tests-batch-and-exit
done
View
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -ex
+
+nosetests
+
+$EMACS --version
+$EMACS -q -batch -L `pwd` -l ert -l elpy-tests.el \
+ -f ert-run-tests-batch-and-exit

0 comments on commit 3506112

Please sign in to comment.