Skip to content

Commit 0c4ea74

Browse files
committed
TST: Js test integration with grunt on travis
Conflicts: .travis.yml -- kept both symlinked TMPDIR logic and gruntfile one
1 parent 176541e commit 0c4ea74

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.travis.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ matrix:
4949
- TMPDIR="/tmp/sym link"
5050
- python: 3.3
5151
- python: 3.4
52-
# Those aren't yet ready since lxml Ibelieve fails to install
52+
# Those aren't yet ready since lxml I believe fails to install
5353
#- python: pypy
5454
#- python: pypy3
5555
# not there -- don't try!
@@ -69,6 +69,8 @@ before_install:
6969
- travis_retry sudo apt-get update -qq
7070
- sudo tools/ci/prep-travis-forssh-sudo.sh
7171
- tools/ci/prep-travis-forssh.sh
72+
# Install grunt-cli
73+
- npm install grunt-cli
7274

7375
install:
7476
# Install standalone build of git-annex for the recent enough version
@@ -90,13 +92,18 @@ install:
9092
- pip install sphinx_rtd_theme
9193
# TMPDIR
9294
- if [ ! -z "$TMPDIR" ]; then echo "Symlinking $TMPDIR"; ln -s /tmp "$TMPDIR"; fi
95+
# Install grunt to test run javascript frontend tests
96+
- npm install grunt
97+
- npm install grunt-contrib-qunit
9398

9499
script:
95100
- if [ ! -z "$DATALAD_TESTS_NONETWORK" ]; then sudo route add -net 0.0.0.0 netmask 0.0.0.0 dev lo; fi
96101
- $NOSE_WRAPPER `which nosetests` -s -v --with-doctest --doctest-tests --with-cov --cover-package datalad --logging-level=INFO
97102
- if [ ! -z "$DATALAD_TESTS_NONETWORK" ]; then sudo route del -net 0.0.0.0 netmask 0.0.0.0 dev lo; fi
98103
# Generate documentation and run doctests
99104
- PYTHONPATH=$PWD make -C docs html doctest
105+
# Run javascript tests
106+
- grunt test --verbose --force
100107

101108
after_success:
102109
- coveralls

Gruntfile.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = function(grunt) {
2+
// Project configuration.
3+
grunt.initConfig({
4+
qunit: {
5+
files: ['datalad/resources/website/tests/test.html']
6+
}
7+
});
8+
// Load plugin
9+
grunt.loadNpmTasks('grunt-contrib-qunit');
10+
// Task to run tests
11+
grunt.registerTask('test', 'qunit');
12+
};

0 commit comments

Comments
 (0)