From 86ed4b6504c34d8252f97c647f34de6d413c2098 Mon Sep 17 00:00:00 2001 From: Silvio Leite Date: Fri, 16 Nov 2018 15:47:21 -0200 Subject: [PATCH] Fix travis.yml --- .gitignore | 1 + .travis.yml | 15 +++++++++++---- README.md | 2 ++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0d5de00..4b7a451 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ build/ dist/ *.egg-info/ .tox/ +.coverage diff --git a/.travis.yml b/.travis.yml index 241eb22..447c2ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,25 @@ language: python +dist: trusty +sudo: required +group: edge python: - "3.6" env: - DJANGO_VERSION=2.0 global: - - CC_TEST_REPORTER_ID=995f11c260357b16b3ead412d8d8466d1609384bcfa38827453d469cc5406865 + - CC_TEST_REPORTER_ID=995f11c260357b16b3ead412d8d8466d1609384bcfa38827453d469cc5406865 install: - pip install Django==$DJANGO_VERSION - pip install tox-travis - pip install -q -r requirements-dev.txt -before_script: + - pip install coverage +before_script: # code coverage tool - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - ./cc-test-reporter before-build -script: tox +script: + - tox + - coverage run runtests.py --source="pwa" -v 2 after_script: - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT \ No newline at end of file + - coverage xml + - if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi \ No newline at end of file diff --git a/README.md b/README.md index 82282e4..8d1f58d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ django-pwa ===== [![Build Status](https://travis-ci.org/silviolleite/django-pwa.svg)](https://travis-ci.org/silviolleite/django-pwa) +[![Maintainability](https://api.codeclimate.com/v1/badges/246542ea921058c4f76f/maintainability)](https://codeclimate.com/github/silviolleite/django-pwa/maintainability) +[![Test Coverage](https://api.codeclimate.com/v1/badges/246542ea921058c4f76f/test_coverage)](https://codeclimate.com/github/silviolleite/django-pwa/test_coverage) This Django app turns your project into a [progressive web app](https://developers.google.com/web/progressive-web-apps/). Navigating to your site on an Android phone will prompt you to add the app to your home screen. ![Prompt for install](https://github.com/silviolleite/django-pwa/raw/master/images/screenshot1.png)