From 2c0fd234877287583c7d6b7dcbb71b7077374b07 Mon Sep 17 00:00:00 2001 From: Fabian Schuh Date: Thu, 28 Feb 2019 16:41:11 +0100 Subject: [PATCH 01/10] Fix SHA1 and SHA256 hash classes --- graphenebase/types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphenebase/types.py b/graphenebase/types.py index 8dab2f3c..7ec8f9ce 100644 --- a/graphenebase/types.py +++ b/graphenebase/types.py @@ -164,13 +164,13 @@ def __init__(self, a): super().__init__(a) -class Sha1(Bytes): +class Sha1(Hash): def __init__(self, a): assert len(a) == 40, "Require 40 char long hex" super().__init__(a) -class Sha256(Bytes): +class Sha256(Hash): def __init__(self, a): assert len(a) == 64, "Require 64 char long hex" super().__init__(a) From e66e5e3d01bdcb7ed3910d9a8753e273f6afb429 Mon Sep 17 00:00:00 2001 From: Fabian Schuh Date: Fri, 8 Mar 2019 08:25:27 +0100 Subject: [PATCH 02/10] install pyup --- .pyup.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .pyup.yml diff --git a/.pyup.yml b/.pyup.yml new file mode 100644 index 00000000..457b8e87 --- /dev/null +++ b/.pyup.yml @@ -0,0 +1,11 @@ +# autogenerated pyup.io config file +# see https://pyup.io/docs/configuration/ for all available options + +update: all + +# update schedule +# default: empty +# allowed: "every day", "every week", .. +schedule: "every week" + +pin: False From 1ee9804ee92653120847fd8081f948fa33180fe3 Mon Sep 17 00:00:00 2001 From: Fabian Schuh Date: Fri, 8 Mar 2019 08:32:46 +0100 Subject: [PATCH 03/10] Install appveyor --- appveyor.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..f6d6a4e3 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,30 @@ +version: "{branch}.{build}" + +environment: + matrix: + - TOXENV: py35 + PYTHON: "C:\\Python35-x64" + PYTHON_VERSION: "3.5.x" + PYTHON_ARCH: "64" + + - TOXENV: py36 + PYTHON: "C:\\Python36-x64" + PYTHON_VERSION: "3.6.x" + PYTHON_ARCH: "64" + + - TOXENV: py37 + PYTHON: "C:\\Python37-x64" + PYTHON_VERSION: "3.7.x" + PYTHON_ARCH: "64" + +install: + - pip install tox + +build: off + +test_script: tox + +notifications: + - provider: Email + on_build_success: false + on_build_status_changed: false From 2b4e717e78f40ba47e7a1bbdc9e216504f6a447d Mon Sep 17 00:00:00 2001 From: Fabian Schuh Date: Fri, 8 Mar 2019 08:51:03 +0100 Subject: [PATCH 04/10] Install CI --- .travis.yml | 20 +++++++++++++++----- README.md | 15 ++++++--------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index c08ac6ee..43cecd5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,34 @@ dist: trusty language: python sudo: false -python: - - 3.5 +python: 3.5 +env: + global: + - CC_TEST_REPORTER_ID=cd0802782ea41e43bb232d303415f475ee6f5087c0d3e4252e3ac4b56509d13d matrix: include: - env: TOXENV=py35 python: 3.5 - env: TOXENV=py36 python: 3.6 - #- env: TOXENV=py37 - # python: 3.7 + - env: TOXENV=py37 + python: 3.7 +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 install: - - pip install tox-travis codecov + - pip install tox-travis codecov coveralls script: - tox - sed -i 's/filename="/filename=".\//g' coverage.xml - ( which sonar-scanner && sonar-scanner || true ) +after_script: + # Pipe the coverage data to Code Climate + - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT after_success: - codecov + - coveralls addons: sonarcloud: diff --git a/README.md b/README.md index 22d61410..1143ec40 100644 --- a/README.md +++ b/README.md @@ -4,20 +4,17 @@ ![](https://img.shields.io/github/downloads/xeroc/python-graphenelib/total.svg?style=for-the-badge) ![](https://img.shields.io/pypi/pyversions/graphenelib.svg?style=for-the-badge) ![](https://img.shields.io/pypi/l/graphenelib.svg?style=for-the-badge) -![](https://cla-assistant.io/readme/badge/xeroc/python-graphenelib) -**Stable** +### Current build status [![Travis master](https://travis-ci.org/xeroc/python-graphenelib.png?branch=master)](https://travis-ci.org/xeroc/python-graphenelib) [![docs master](https://readthedocs.org/projects/python-graphenelib/badge/?version=latest)](http://python-graphenelib.readthedocs.io/en/latest/) [![codecov](https://codecov.io/gh/xeroc/python-graphenelib/branch/master/graph/badge.svg)](https://codecov.io/gh/xeroc/python-graphenelib) - - -**Develop** - -[![Travis develop](https://travis-ci.org/xeroc/python-graphenelib.png?branch=develop)](https://travis-ci.org/xeroc/python-graphenelib) -[![docs develop](https://readthedocs.org/projects/python-graphenelib/badge/?version=develop)](http://python-graphenelib.readthedocs.io/en/develop/) -[![codecov develop](https://codecov.io/gh/xeroc/python-graphenelib/branch/develop/graph/badge.svg)](https://codecov.io/gh/xeroc/python-graphenelib) +[![Maintainability](https://api.codeclimate.com/v1/badges/8dd7a9b3f06a1ef9188a/maintainability)](https://codeclimate.com/github/xeroc/python-graphenelib/maintainability) +[![Test Coverage](https://api.codeclimate.com/v1/badges/8dd7a9b3f06a1ef9188a/test_coverage)](https://codeclimate.com/github/xeroc/python-graphenelib/test_coverage) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=python-graphene&metric=alert_status)](https://sonarcloud.io/dashboard?id=python-graphene) +![](https://pyup.io/repos/github/xeroc/python-graphenelib/shield.svg) +![](https://cla-assistant.io/readme/badge/xeroc/python-graphenelib) --- ## Documentation From 8a35e5b98ac54cbd1d0cf95d09981c2e24a9742f Mon Sep 17 00:00:00 2001 From: Fabian Schuh Date: Fri, 8 Mar 2019 09:05:22 +0100 Subject: [PATCH 05/10] remove code smell in graphenestorage/sqlite.py --- graphenestorage/sqlite.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/graphenestorage/sqlite.py b/graphenestorage/sqlite.py index ad64a42e..6df3b936 100644 --- a/graphenestorage/sqlite.py +++ b/graphenestorage/sqlite.py @@ -45,7 +45,7 @@ def __init__(self, *args, **kwargs): else: self.storageDatabase = "{}.sqlite".format(appname) - self.sqlDataBaseFile = os.path.join(data_dir, self.storageDatabase) + self.sqlite_file = os.path.join(data_dir, self.storageDatabase) """ Ensure that the directory in which the data is stored exists @@ -97,7 +97,7 @@ def _haveKey(self, key): ), (key,), ) - connection = sqlite3.connect(self.sqlDataBaseFile) + connection = sqlite3.connect(self.sqlite_file) cursor = connection.cursor() cursor.execute(*query) return True if cursor.fetchone() else False @@ -122,7 +122,7 @@ def __setitem__(self, key, value): ), (key, value), ) - connection = sqlite3.connect(self.sqlDataBaseFile) + connection = sqlite3.connect(self.sqlite_file) cursor = connection.cursor() cursor.execute(*query) connection.commit() @@ -138,7 +138,7 @@ def __getitem__(self, key): ), (key,), ) - connection = sqlite3.connect(self.sqlDataBaseFile) + connection = sqlite3.connect(self.sqlite_file) cursor = connection.cursor() cursor.execute(*query) result = cursor.fetchone() @@ -157,7 +157,7 @@ def __iter__(self): def keys(self): query = "SELECT {} from {}".format(self.__key__, self.__tablename__) - connection = sqlite3.connect(self.sqlDataBaseFile) + connection = sqlite3.connect(self.sqlite_file) cursor = connection.cursor() cursor.execute(query) return [x[0] for x in cursor.fetchall()] @@ -166,7 +166,7 @@ def __len__(self): """ return lenght of store """ query = "SELECT id from {}".format(self.__tablename__) - connection = sqlite3.connect(self.sqlDataBaseFile) + connection = sqlite3.connect(self.sqlite_file) cursor = connection.cursor() cursor.execute(query) return len(cursor.fetchall()) @@ -189,7 +189,7 @@ def items(self): query = "SELECT {}, {} from {}".format( self.__key__, self.__value__, self.__tablename__ ) - connection = sqlite3.connect(self.sqlDataBaseFile) + connection = sqlite3.connect(self.sqlite_file) cursor = connection.cursor() cursor.execute(query) r = [] @@ -218,7 +218,7 @@ def delete(self, key): "DELETE FROM {} WHERE {}=?".format(self.__tablename__, self.__key__), (key,), ) - connection = sqlite3.connect(self.sqlDataBaseFile) + connection = sqlite3.connect(self.sqlite_file) cursor = connection.cursor() cursor.execute(*query) connection.commit() @@ -227,7 +227,7 @@ def wipe(self): """ Wipe the store """ query = "DELETE FROM {}".format(self.__tablename__) - connection = sqlite3.connect(self.sqlDataBaseFile) + connection = sqlite3.connect(self.sqlite_file) cursor = connection.cursor() cursor.execute(query) connection.commit() @@ -239,7 +239,7 @@ def exists(self): "SELECT name FROM sqlite_master " + "WHERE type='table' AND name=?", (self.__tablename__,), ) - connection = sqlite3.connect(self.sqlDataBaseFile) + connection = sqlite3.connect(self.sqlite_file) cursor = connection.cursor() cursor.execute(*query) return True if cursor.fetchone() else False @@ -255,7 +255,7 @@ def create(self): # pragma: no cover {} STRING(256) )""" ).format(self.__tablename__, self.__key__, self.__value__) - connection = sqlite3.connect(self.sqlDataBaseFile) + connection = sqlite3.connect(self.sqlite_file) cursor = connection.cursor() cursor.execute(query) connection.commit() From b83e31a680aeb2ed2a47a543efed714663148b68 Mon Sep 17 00:00:00 2001 From: Fabian Schuh Date: Fri, 8 Mar 2019 10:06:45 +0100 Subject: [PATCH 06/10] Unittesting updates and CI --- README.md | 2 +- graphenestorage/masterpassword.py | 42 ++++++++++++++++++------------- requirements-test.txt | 1 + setup.cfg | 11 ++++++-- sonar-project.properties | 16 +++++------- tests/test_sqlite.py | 2 +- tests/test_storage.py | 18 ++++++------- 7 files changed, 52 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 1143ec40..0257ae33 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ [![codecov](https://codecov.io/gh/xeroc/python-graphenelib/branch/master/graph/badge.svg)](https://codecov.io/gh/xeroc/python-graphenelib) [![Maintainability](https://api.codeclimate.com/v1/badges/8dd7a9b3f06a1ef9188a/maintainability)](https://codeclimate.com/github/xeroc/python-graphenelib/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/8dd7a9b3f06a1ef9188a/test_coverage)](https://codeclimate.com/github/xeroc/python-graphenelib/test_coverage) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=python-graphene&metric=alert_status)](https://sonarcloud.io/dashboard?id=python-graphene) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=graphenelib&metric=alert_status)](https://sonarcloud.io/dashboard?id=graphenelib) ![](https://pyup.io/repos/github/xeroc/python-graphenelib/shield.svg) ![](https://cla-assistant.io/readme/badge/xeroc/python-graphenelib) diff --git a/graphenestorage/masterpassword.py b/graphenestorage/masterpassword.py index e65cf3bd..963a84f3 100644 --- a/graphenestorage/masterpassword.py +++ b/graphenestorage/masterpassword.py @@ -2,6 +2,7 @@ import os import hashlib import logging +import warnings from binascii import hexlify @@ -87,12 +88,12 @@ def unlock(self, password): """ self.password = password if self.config_key in self.config and self.config[self.config_key]: - self.decryptEncryptedMaster() + self._decrypt_masterpassword() else: - self.newMaster(password) - self.saveEncrytpedMaster() + self._new_masterpassword(password) + self._save_encrypted_masterpassword() - def decryptEncryptedMaster(self): + def _decrypt_masterpassword(self): """ Decrypt the encrypted masterkey """ aes = AESCipher(self.password) @@ -100,19 +101,19 @@ def decryptEncryptedMaster(self): try: decrypted_master = aes.decrypt(encrypted_master) except Exception: - self.raiseWrongMasterPasswordException() - if checksum != self.deriveChecksum(decrypted_master): - self.raiseWrongMasterPasswordException() + self._raise_wrongmasterpassexception() + if checksum != self._derive_checksum(decrypted_master): + self._raise_wrongmasterpassexception() self.decrypted_master = decrypted_master - def raiseWrongMasterPasswordException(self): + def _raise_wrongmasterpassexception(self): self.password = None raise WrongMasterPasswordException - def saveEncrytpedMaster(self): - self.config[self.config_key] = self.getEncryptedMaster() + def _save_encrypted_masterpassword(self): + self.config[self.config_key] = self._get_encrypted_masterpassword() - def newMaster(self, password): + def _new_masterpassword(self, password): """ Generate a new random masterkey, encrypt it with the password and store it in the store. @@ -126,10 +127,10 @@ def newMaster(self, password): # Encrypt and save master self.password = password - self.saveEncrytpedMaster() + self._save_encrypted_masterpassword() return self.masterkey - def deriveChecksum(self, s): + def _derive_checksum(self, s): """ Derive the checksum :param str s: Random string for which to derive the checksum @@ -137,7 +138,7 @@ def deriveChecksum(self, s): checksum = hashlib.sha256(bytes(s, "ascii")).hexdigest() return checksum[:4] - def getEncryptedMaster(self): + def _get_encrypted_masterpassword(self): """ Obtain the encrypted masterkey .. note:: The encrypted masterkey is checksummed, so that we can @@ -148,16 +149,16 @@ def getEncryptedMaster(self): raise WalletLocked aes = AESCipher(self.password) return "{}${}".format( - self.deriveChecksum(self.masterkey), aes.encrypt(self.masterkey) + self._derive_checksum(self.masterkey), aes.encrypt(self.masterkey) ) - def changePassword(self, newpassword): + def change_password(self, newpassword): """ Change the password that allows to decrypt the master key """ if not self.unlocked(): raise WalletLocked self.password = newpassword - self.saveEncrytpedMaster() + self._save_encrypted_masterpassword() def decrypt(self, wif): """ Decrypt the content according to BIP38 @@ -176,3 +177,10 @@ def encrypt(self, wif): if not self.unlocked(): raise WalletLocked return format(bip38.encrypt(str(wif), self.masterkey), "encwif") + + def changePassword(self, newpassword): + warnings.warn( + "changePassword will be replaced by change_password in the future", + PendingDeprecationWarning, + ) + return self.change_password(newpassword) diff --git a/requirements-test.txt b/requirements-test.txt index 40a2f1fa..d4a5c8c7 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -3,6 +3,7 @@ pycrypto==2.6.1 scrypt>=0.7.1 secp256k1 pytest +nose coverage mock diff --git a/setup.cfg b/setup.cfg index 9172fb77..d17236ad 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,7 +15,6 @@ omit= [coverage:report] ignore_errors=True show_missing=True - include=graphene* omit = # This file is proven and won't be touch @@ -31,7 +30,7 @@ exclude_lines = except ImportError: if 0: if __name__ == .__main__.: - if sys.version > '3': + if sys.version > '3': SECP256K1_MODULE [flake8] @@ -55,3 +54,11 @@ multi_line_output = 3 line_length = 88 known_third_party = include_trailing_comma = true + +[nosetests] +verbosity=3 +nocapture=1 +nologcapture=1 +cover-xml=1 +with-coverage=1 +with-xunit=1 diff --git a/sonar-project.properties b/sonar-project.properties index e58ea308..eb2ff1c3 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,17 +1,18 @@ # Metadata -sonar.projectKey=python-graphene +sonar.projectKey=graphenelib sonar.projectName=Python Graphene Library sonar.projectVersion=1.0 sonar.organization=graphene # Upload to sonar cloud sonar.host.url=https://sonarcloud.io - + # Language sonar.language=py # Sources -sonar.sources=grapheneapi,graphenebase,graphenestorage +#sonar.sources=grapheneapi,graphenebase,graphenestorage +sonar.sources=. # Unit tests sonar.tests=./tests/ @@ -19,19 +20,14 @@ sonar.tests=./tests/ # Linter #sonar.python.pylint=/usr/local/bin/pylint #sonar.python.pylint_config=.pylintrc -#sonar.python.pylint.reportPath=pylint-report.txt +#sonar.python.pylint.reportPath=pylint-report.txt sonar.links.homepage=https://bitshares.org sonar.links.ci=https://travis-ci.org/xeroc/python-graphenelib/ sonar.links.issue=https://github.com/xeroc/python-graphenelib/issues sonar.links.scm=https://github.com/xeroc/python-graphenelib/tree/master - sonar.exclusions=htmlcov/*,docs/*,build/*,dist/*,*.py,tests/* # coverage -# sonar.python.xunit.reportPath=test-reports/*.xml -#sonar.python.coverage.reportPath=coverage.xml - +sonar.python.coverage.reportPaths=coverage.xml sonar.python.xunit.reportPath=nosetests.xml -sonar.python.coverage.reportPath=coverage.xml -#sonar.python.coveragePlugin=cobertura diff --git a/tests/test_sqlite.py b/tests/test_sqlite.py index b47cfca7..ec9fab2d 100644 --- a/tests/test_sqlite.py +++ b/tests/test_sqlite.py @@ -21,7 +21,7 @@ def test_init(self): self.assertEqual(store.storageDatabase, "testing.sqlite") store = MyStore(profile="testing", data_dir="/tmp/temporaryFolder") - self.assertEqual(store.sqlDataBaseFile, "/tmp/temporaryFolder/testing.sqlite") + self.assertEqual(store.sqlite_file, "/tmp/temporaryFolder/testing.sqlite") def test_initialdata(self): store = MyStore() diff --git a/tests/test_storage.py b/tests/test_storage.py index 6bfb6d77..41e5cd6b 100644 --- a/tests/test_storage.py +++ b/tests/test_storage.py @@ -142,10 +142,10 @@ def do_keystore(self, keys): "6PRViepa2zaXXGEQTYUsoLM1KudLmNBB1t812jtdKx1TEhQtvxvmtEm6Yh" ) with self.assertRaises(WalletLocked): - keys.getEncryptedMaster() + keys._get_encrypted_masterpassword() # set the first MasterPassword here! - keys.newMaster(password) + keys._new_masterpassword(password) keys.lock() keys.unlock(password) assert keys.unlocked() @@ -198,24 +198,24 @@ def test_masterpassword(self): config = storage.InRamConfigurationStore() keys = storage.InRamEncryptedKeyStore(config=config) self.assertFalse(keys.has_masterpassword()) - master = keys.newMaster(password) + master = keys._new_masterpassword(password) self.assertEqual( len(master), len("66eaab244153031e8172e6ffed321" "7288515ddb63646bbefa981a654bdf25b9f"), ) with self.assertRaises(Exception): - keys.newMaster(master) + keys._new_masterpassword(master) keys.lock() with self.assertRaises(Exception): - keys.changePassword("foobar") + keys.change_password("foobar") keys.unlock(password) self.assertEqual(keys.decrypted_master, master) new_pass = "new_secret_password" - keys.changePassword(new_pass) + keys.change_password(new_pass) keys.lock() keys.unlock(new_pass) self.assertEqual(keys.decrypted_master, master) @@ -223,7 +223,7 @@ def test_masterpassword(self): def test_wrongmastermass(self): config = storage.InRamConfigurationStore() keys = storage.InRamEncryptedKeyStore(config=config) - keys.newMaster("foobar") + keys._new_masterpassword("foobar") keys.lock() with self.assertRaises(WrongMasterPasswordException): keys.unlock("foobar2") @@ -237,14 +237,14 @@ def test_masterpwd(self): keys.unlock("foobar") keys.password = "FOoo" with self.assertRaises(Exception): - keys.decryptEncryptedMaster() + keys._decrypt_masterpassword() keys.lock() with self.assertRaises(WrongMasterPasswordException): keys.unlock("foobar2") with self.assertRaises(Exception): - keys.getEncryptedMaster() + keys._get_encrypted_masterpassword() self.assertFalse(keys.unlocked()) From 3f55cfa91a3a13c06c4e3951b599458e7f2cbba4 Mon Sep 17 00:00:00 2001 From: Fabian Schuh Date: Fri, 8 Mar 2019 10:09:18 +0100 Subject: [PATCH 07/10] remove sonarcloud --- README.md | 1 - sonar-project.properties | 33 --------------------------------- 2 files changed, 34 deletions(-) delete mode 100644 sonar-project.properties diff --git a/README.md b/README.md index 0257ae33..bb8ac84d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ [![codecov](https://codecov.io/gh/xeroc/python-graphenelib/branch/master/graph/badge.svg)](https://codecov.io/gh/xeroc/python-graphenelib) [![Maintainability](https://api.codeclimate.com/v1/badges/8dd7a9b3f06a1ef9188a/maintainability)](https://codeclimate.com/github/xeroc/python-graphenelib/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/8dd7a9b3f06a1ef9188a/test_coverage)](https://codeclimate.com/github/xeroc/python-graphenelib/test_coverage) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=graphenelib&metric=alert_status)](https://sonarcloud.io/dashboard?id=graphenelib) ![](https://pyup.io/repos/github/xeroc/python-graphenelib/shield.svg) ![](https://cla-assistant.io/readme/badge/xeroc/python-graphenelib) diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index eb2ff1c3..00000000 --- a/sonar-project.properties +++ /dev/null @@ -1,33 +0,0 @@ -# Metadata -sonar.projectKey=graphenelib -sonar.projectName=Python Graphene Library -sonar.projectVersion=1.0 -sonar.organization=graphene - -# Upload to sonar cloud -sonar.host.url=https://sonarcloud.io - -# Language -sonar.language=py - -# Sources -#sonar.sources=grapheneapi,graphenebase,graphenestorage -sonar.sources=. - -# Unit tests -sonar.tests=./tests/ - -# Linter -#sonar.python.pylint=/usr/local/bin/pylint -#sonar.python.pylint_config=.pylintrc -#sonar.python.pylint.reportPath=pylint-report.txt - -sonar.links.homepage=https://bitshares.org -sonar.links.ci=https://travis-ci.org/xeroc/python-graphenelib/ -sonar.links.issue=https://github.com/xeroc/python-graphenelib/issues -sonar.links.scm=https://github.com/xeroc/python-graphenelib/tree/master -sonar.exclusions=htmlcov/*,docs/*,build/*,dist/*,*.py,tests/* - -# coverage -sonar.python.coverage.reportPaths=coverage.xml -sonar.python.xunit.reportPath=nosetests.xml From 4efd1fde45e7ad7ed5ab61a975ea946cea7febdd Mon Sep 17 00:00:00 2001 From: Fabian Schuh Date: Fri, 8 Mar 2019 10:15:11 +0100 Subject: [PATCH 08/10] Fix cc-test-reporter execution to work with symlinks --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 43cecd5b..aa2e6c40 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ script: - ( which sonar-scanner && sonar-scanner || true ) after_script: # Pipe the coverage data to Code Climate - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT + - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT --prefix $(readlink -f .) after_success: - codecov - coveralls From 87fa92d20447049679da20f6163580961006ab20 Mon Sep 17 00:00:00 2001 From: Fabian Schuh Date: Fri, 8 Mar 2019 10:17:21 +0100 Subject: [PATCH 09/10] travis-ci withoutp python3.7 --- .travis.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index aa2e6c40..a0f17d53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,8 @@ matrix: python: 3.5 - env: TOXENV=py36 python: 3.6 - - env: TOXENV=py37 - python: 3.7 +# - env: TOXENV=py37 +# python: 3.7 before_script: - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter @@ -29,9 +29,3 @@ after_script: after_success: - codecov - coveralls - -addons: - sonarcloud: - organization: graphene - token: - secure: "KcIUKNAnkaA50M52pfiUhJYT3F4VtXQSlmdedcUO0xVxig6Z5watdDEKSbqmD7jDCX+aZizCx2gPHrm+hPdXPKz4B9/U4MtxOyn35bJ7i58mWRvKicBf8PaPmQSYTWW8iJIuJ1GNv9Ymxq45IbkgjL/A7XQEGXiKmpbgLKe0ADMohG63UufarltGuQr0fXKAXaVCb9mJNBICXHLSY2VeNYqyLtS/gEbOoVpTh7yKgrUT7u3j3Yn+oC+1+1KzRNzZ9/iY5AqWSkpUV20Rt41njBCEulNR2t8b0Ykd127pOy9qxddqoBbJ0Dav5a+gXRwNt4h8t0iioHFnBaE4Nhtdvps0pFHHzON8UDEiAtcTTtttrayqNZZ/g3TRrZsujavE9PxINXEClc0AaX4bJOEhmimcnvzQfaSj5xuGvT7Ci2sA/UXw9dSGthJIpqeMdmGKrc/0CrP29Azoa6D9G+q4ZE6pEF1jmkaaER8AA+EqRZTQBuqlSeDyTH+ro1SMDqvV7X5rTro4eMpCTSCvVsr3/02XNyPQ0FplQ7QafZi2kMjP8h7y45EdQKr8Rq6INk08J2ae6UwcS8yH7EQw3WhHx3sSuuZZSFJ5uiTb5+a10MFqw8ng/seXW9HglcR/rskml3kZToECEk4EWfbLmMCFDWJlYv8LIbUQwOIsxgHX3tw=" From fb7d50c666e6bc5492f8d4812bec452191421095 Mon Sep 17 00:00:00 2001 From: Fabian Schuh Date: Fri, 8 Mar 2019 10:24:50 +0100 Subject: [PATCH 10/10] ban sonar and sed from travisci --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a0f17d53..0180f910 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,10 +21,7 @@ install: - pip install tox-travis codecov coveralls script: - tox - - sed -i 's/filename="/filename=".\//g' coverage.xml - - ( which sonar-scanner && sonar-scanner || true ) after_script: - # Pipe the coverage data to Code Climate - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT --prefix $(readlink -f .) after_success: - codecov