Skip to content

Commit

Permalink
setup codeclimate (#35)
Browse files Browse the repository at this point in the history
* setup codeclimate
* add badge
* adjust secret key for travis
  • Loading branch information
mcescalante authored Mar 6, 2018
1 parent f08f619 commit 2bb10a3
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 19 deletions.
6 changes: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[run]
omit =
*/__init__.py
*/tests/*
*/migration/*
manage.py
15 changes: 14 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,21 @@ language: python
python:
- "3.5"
- "3.6"

install:
- pip install pipenv
- pipenv install --dev

before_script:
- mkdir bin
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > bin/cc-test-reporter
- chmod +x bin/cc-test-reporter
- bin/cc-test-reporter before-build

script:
- flake8
- python manage.py test
- coverage run --source="." manage.py test

after_success:
- coverage xml
- bin/cc-test-reporter after-build -t coverage.py
3 changes: 2 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ name = "pypi"
[dev-packages]

flake8 = "*"
coverage = "*"


[packages]
Expand All @@ -30,4 +31,4 @@ whitenoise = "*"

[requires]

python_version = "3.5"
python_version = "3.6"
88 changes: 73 additions & 15 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# oh-proj-management

[![Build Status](https://travis-ci.org/OpenHumans/oh-proj-management.svg?branch=master)](https://travis-ci.org/OpenHumans/oh-proj-management)
[![Build Status](https://travis-ci.org/OpenHumans/oh-proj-management.svg?branch=master)](https://travis-ci.org/OpenHumans/oh-proj-management) [![Maintainability](https://api.codeclimate.com/v1/badges/575d24a8ebf4170ee90e/maintainability)](https://codeclimate.com/github/OpenHumans/oh-proj-management/maintainability)

Web app which Open Humans projects can use to view and work with their members and data.

Expand Down
2 changes: 1 addition & 1 deletion oh_proj_management/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def to_bool(string, default):


# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.getenv('SECRET_KEY')
SECRET_KEY = os.getenv('SECRET_KEY', 'testkeyifnone')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = to_bool(os.getenv('DEBUG'), default=False)
Expand Down

0 comments on commit 2bb10a3

Please sign in to comment.