From ed95fe288a30f1d6c52efc2fc116dc6139905142 Mon Sep 17 00:00:00 2001 From: Vincent Poulailleau Date: Sun, 2 Aug 2020 21:37:35 +0200 Subject: [PATCH] use travis and codeclimate --- .codeclimate.yml | 10 ++++++++++ .travis.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .codeclimate.yml create mode 100644 .travis.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..6ceb7ab --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,10 @@ +plugins: + bandit: + enabled: true + radon: + enabled: true + sonar-python: + enabled: true + config: + tests_patterns: + - tests/** diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2f4f9b9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +env: + global: + - CC_TEST_REPORTER_ID=24d2bc5ffa5ffc6083c070293660c1a117101d4bf773ee3fd8e49f0be7a6e031 +language: python +matrix: + include: + - python: 3.8 + dist: bionic + sudo: true + - python: 3.7 + dist: xenial + sudo: true + +before_install: + - pip install poetry + +install: + - poetry install + +before_script: + - 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 +after_script: + - echo "$TRAVIS_PULL_REQUEST" + - echo "$TRAVIS_PYTHON_VERSION" + - find . -name ".coverage" + - if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_PYTHON_VERSION" == "3.7" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT tests/coverage.xml; fi