From 4ac7dd3655b104855bda1f2fc3d5828c830ac63d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Wed, 26 May 2021 18:26:27 +0200 Subject: [PATCH] fix travis --- .coveragerc | 9 +++++++++ .travis.yml | 9 +++------ setup.py | 6 +++++- unittest.cfg | 2 ++ 4 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 .coveragerc create mode 100644 unittest.cfg diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..0d3cac9 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,9 @@ +[run] +branch=1 +source= + minijson +omit= + tests/* + .eggs/* + setup.py +plugins = Cython.Coverage diff --git a/.travis.yml b/.travis.yml index f8ddbbf..94dd602 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,21 +3,18 @@ cache: pip before_script: - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - - pwd - ./cc-test-reporter before-build - pip install -r requirements.txt - - pip install -U pytest-xdist pytest-cov pytest pytest-forked pluggy py mock - - python setup.py install - - rm -rf minijson jobs: include: - stage: test - stage: test python: "3.8" script: - - pytest -n 8 --cov=satella + - DEBUG=1 python setup.py test after_script: - coverage xml - - ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT + - ./cc-test-reporter after-build -t coverage.py --exit-code ${TRAVIS_TEST_RESULT} + diff --git a/setup.py b/setup.py index 5b83bb5..f764d7b 100644 --- a/setup.py +++ b/setup.py @@ -21,5 +21,9 @@ setup(version='1.7', dont_snakehouse=dont_snakehouse), ], compiler_directives=directives, **build_kwargs), python_requires='!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*', - zip_safe=False + tests_require=[ + "nose2", "mock", "coverage", "nose2[coverage_plugin]" + ], + test_suite='nose2.collector.collector', + zip_safe=True ) diff --git a/unittest.cfg b/unittest.cfg new file mode 100644 index 0000000..84743c4 --- /dev/null +++ b/unittest.cfg @@ -0,0 +1,2 @@ +[coverage] +always-on = True -- GitLab