Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Found and fixed the potential error in .travis.yml #36

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# .coveragerc to control coverage.py
[run]
branch = True

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

#Exclude debug
if settings.debug

from * import *
import *

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

ignore_errors = False

[html]
directory = coverage_html_report
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ src/*.egg-info
*~
\#*#
*.sql
*.db
encefal_dev
conf.py
django.wsgi
Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ before_script:
# ex2: script: make test
# note: si script est absent du fichier => message d'erreur + fail du build
script:
- env/bin/coverage run django/manage.py test main
- env/bin/coverage run django/manage.py test employee
- env/bin/coverage run --omit=*.virtualenv*,*virtualenv*,*env* django/manage.py test --cover-package=main,employee main employee

after_success:
- env/bin/coveralls
3 changes: 3 additions & 0 deletions django/EnceFAL/conf.py.edit
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = None
EMAIL_HOST_PASSWORD = None
EMAIL_PORT = 587

# MUST be removed before deploying
CORS_ORIGIN_ALLOW_ALL = True
11 changes: 11 additions & 0 deletions django/EnceFAL/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
INSTALLED_APPS = [
'main',
'employee',
'corsheaders',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
Expand All @@ -44,9 +45,11 @@
'django.contrib.admin',
#'django.contrib.admin.apps.SimpleAdminConfig',
'django.contrib.staticfiles',
'django_nose',
]

MIDDLEWARE_CLASSES = [
'corsheaders.middleware.CorsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
Expand Down Expand Up @@ -90,6 +93,14 @@
LOGIN_REDIRECT_URL = "/employee/"
LOGIN_URL = "/employee/login/"

#### Tests config ####
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'

NOSE_ARGS=[
'--with-coverage'
]


# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators

Expand Down
2 changes: 2 additions & 0 deletions django/EnceFAL/static/admin/js/jquery.init.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
*/
var django = django || {};
django.jQuery = jQuery.noConflict(true);
var JQuery = django.jQuery
var $ = JQuery
4 changes: 4 additions & 0 deletions django/EnceFAL/static/admin/js/jquery.min.js

Large diffs are not rendered by default.

Loading