diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..e31ac7535142e1cfd2e9d154c0cdc26b50c00869 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +language: python +python: + - 2.7 +before_install: + ## courtesy of http://conda.pydata.org/docs/travis.html + - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then + wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; + else + wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; + fi + - bash miniconda.sh -b -p $HOME/miniconda + - export PATH="$HOME/miniconda/bin:$PATH" + - hash -r + - conda config --set always_yes yes --set changeps1 no + - conda update --yes conda + - conda info -a + ## back to other dependencies + - nvm install stable + - nvm use stable + - npm install -g grunt-cli + - npm --version + - node --version +install: + - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy scipy nose flake8 + - source activate test-environment + - pip install obspy + - npm install +script: grunt lint test diff --git a/Gruntfile.js b/Gruntfile.js index a336bb3c68ea0dfc2c464c7ff3117f304ebe4d01..ab4caea68c4b051a314cf2d49ae1436d97b0922e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,14 +6,18 @@ module.exports = function (grunt) { config.tasks.forEach(grunt.loadNpmTasks); grunt.initConfig(config); + grunt.registerTask('lint', [ + 'flake8', + 'jshint' + ]); + grunt.registerTask('test', [ 'nose:main' ]); grunt.registerTask('default', [ 'clean', - 'flake8', - 'jshint', + 'lint', 'test', 'watch' ]); diff --git a/README.md b/README.md index 95178f6c73b721107522c00b39a6bbb7e14170f5..38ac259af87769a2914e0a61fb2d99b70f3da2b7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ Geomag Algorithms ================= +[](https://travis-ci.org/usgs/geomag-algorithms) + Geomag algorithms includes tools to fetch, process, and output geomag data. diff --git a/package.json b/package.json index 6c3dd5d375cde6a43b3cd2c34b844449380176a2..bda03470b1c4430e3c2d3b7bd37667e631758c2e 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "license": "Public Domain", "dependencies": {}, "devDependencies": { + "grunt": "^0.4.5", "grunt-contrib-clean": "^0.7.0", "grunt-contrib-jshint": "^0.10.0", "grunt-contrib-watch": "^0.6.1",