Browse Source

Merge branch 'maxkoryukov-feature/ci-success' into develop

# Conflicts:
#	.gitignore
pull/5935/head
Ruud 9 years ago
parent
commit
f5b522bd42
  1. 11
      .coveragerc
  2. 9
      .gitignore
  3. 2
      .nosetestsrc
  4. 34
      .travis.yml
  5. 52
      Gruntfile.js
  6. 2
      README.md
  7. 2
      do.tests.sh
  8. 52
      package.json

11
.coveragerc

@ -0,0 +1,11 @@
[run]
source=
./couchpotato/
omit =
./libs/*
./node_modules/*
[report]
omit =
*/python?.?/*
./libs/*
./node_modules/*

9
.gitignore

@ -4,6 +4,9 @@
/_source/
.project
.pydevproject
node_modules
.tmp
.sass-cache
/node_modules/
/.tmp/
/.sass-cache/
.coverage
coverage.xml
nosetests.xml

2
.nosetestsrc

@ -0,0 +1,2 @@
[nosetests]
where=couchpotato

34
.travis.yml

@ -0,0 +1,34 @@
language: python
sudo: false
python:
# - "2.6"
- "2.7"
# - "3.2"
# - "3.3"
# - "3.4"
# - "3.5"
# - "3.5-dev" # 3.5 development branch
# - "nightly" # currently points to 3.6-dev
cache:
pip: true
directories:
- node_modules
# command to install dependencies
install:
- npm install
- pip install --upgrade pip
- pip install coverage
- pip install coveralls
# disabled, since we don't require colors for tests on travis
- pip install --upgrade nose
# - pip install rednose
# command to run tests
script:
- grunt test
- grunt coverage
after_success:
coveralls

52
Gruntfile.js

@ -9,6 +9,8 @@ module.exports = function(grunt){
// Configurable paths
var config = {
python: grunt.file.exists('./_env/bin/python') ? './_env/bin/python' : 'python',
// colorful output on travis is not required, so disable it there, using travic'es env var :
colorful_tests_output: ! process.env.TRAVIS,
tmp: '.tmp',
base: 'couchpotato',
css_dest: 'couchpotato/static/style/combined.min.css',
@ -176,6 +178,49 @@ module.exports = function(grunt){
}
},
// TEST TASKS ==============================================================
env: {
options: {
},
test:{
concat: {
PYTHONPATH: {
'value' : './libs',
'delimiter' : ':',
}
}
}
},
// for python tests
nose: {
options: {
verbosity: 2,
exe: true,
config: './.nosetestsrc',
// 'rednose' is a colored output for nose test-runner. But we do not requre colors on travis-ci
rednose: config.colorful_tests_output,
externalNose: true
},
test: {
},
coverage: {
options:{
with_coverage: true,
cover_package: "couchpotato",
cover_branches: true,
cover_xml: true,
with_doctest: true,
with_xunit: true,
cover_tests: false,
cover_erase: true,
}
},
},
concurrent: {
options: {
logConcurrentOutput: true
@ -185,6 +230,12 @@ module.exports = function(grunt){
});
// testing task
grunt.registerTask('test', ['env:test', 'nose:test']);
// currently, coverage does not generate local html report, but it is useful and possible
grunt.registerTask('coverage', ['env:test', 'nose:coverage']);
grunt.registerTask('default', [
'clean:server',
'sass:server',
@ -195,5 +246,4 @@ module.exports = function(grunt){
'uglify:plugins',
'concurrent'
]);
};

2
README.md

@ -2,6 +2,8 @@ CouchPotato
=====
[![Join the chat at https://gitter.im/RuudBurger/CouchPotatoServer](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/RuudBurger/CouchPotatoServer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/RuudBurger/CouchPotatoServer.svg?branch=develop)](https://travis-ci.org/RuudBurger/CouchPotatoServer)
[![Coverage Status](https://coveralls.io/repos/RuudBurger/CouchPotatoServer/badge.svg?branch=develop&service=github)](https://coveralls.io/github/RuudBurger/CouchPotatoServer?branch=develop)
CouchPotato (CP) is an automatic NZB and torrent downloader. You can keep a "movies I want"-list and it will search for NZBs/torrents of these movies every X hours.
Once a movie is found, it will send it to SABnzbd or download the torrent to a specified directory.

2
do.tests.sh

@ -1,2 +0,0 @@
#!/bin/sh
PYTHONPATH=./libs python -m unittest discover -v -s ./couchpotato/

52
package.json

@ -1,26 +1,30 @@
{
"name": "couchpotato_develop",
"repository": {
"type": "git",
"url": ""
},
"scripts": {
"start": "grunt"
},
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.5",
"grunt-autoprefixer": "^3.0.3",
"grunt-concurrent": "~2.1.0",
"grunt-contrib-clean": "^0.7.0",
"grunt-contrib-cssmin": "~0.14.0",
"grunt-contrib-jshint": "~0.11.2",
"grunt-contrib-sass": "^0.9.2",
"grunt-contrib-uglify": "~0.11.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-shell-spawn": "^0.3.8",
"jit-grunt": "^0.9.1",
"jshint-stylish": "^2.0.1",
"time-grunt": "^1.2.1"
}
"name": "couchpotato_develop",
"repository": {
"type": "git",
"url": ""
},
"scripts": {
"start": "grunt",
"test": "grunt test"
},
"license": "GPL-3.0",
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.5",
"grunt-autoprefixer": "^3.0.3",
"grunt-concurrent": "~2.1.0",
"grunt-contrib-clean": "^0.7.0",
"grunt-contrib-cssmin": "~0.14.0",
"grunt-contrib-jshint": "~0.11.2",
"grunt-contrib-sass": "^0.9.2",
"grunt-contrib-uglify": "~0.11.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-env": "^0.4.4",
"grunt-nose": "^1.0.0",
"grunt-shell-spawn": "^0.3.8",
"jit-grunt": "^0.9.1",
"jshint-stylish": "^2.0.1",
"time-grunt": "^1.2.1"
}
}

Loading…
Cancel
Save