Skip to content
Snippets Groups Projects
Commit 24b4a139 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

fix coverage

parent b0763b97
No related branches found
No related tags found
No related merge requests found
[run]
branch=1
omit=
tests/*
.eggs/*
setup.py
omit=setup.py
plugins = Cython.Coverage
......@@ -5,8 +5,8 @@ before_script:
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
- pip install -r requirements.txt
- pip install pytest mock coverage cython[coverage] pytest-cov
- DEBUG=1 python setup.py build_ext --inplace --force --define CYTHON_TRACE
- pip install pytest coverage pytest-cov
- DEBUG=1 python setup.py install
- rm -rf minijson
jobs:
include:
......@@ -15,6 +15,7 @@ jobs:
script:
- pytest --cov=./ --cov-report=xml
after_script:
- coverage xml
- ./cc-test-reporter after-build -t coverage.py --exit-code ${TRAVIS_TEST_RESULT}
......
FROM smokserwis/build:python3
RUN pip install snakehouse Cython satella pytest
RUN pip install snakehouse Cython satella pytest coverage pytest-cov
ENV DEBUG=1
WORKDIR /tmp/compile
ADD minijson /tmp/compile/minijson
ADD setup.py /tmp/compile/setup.py
ADD README.md /tmp/compile/README.md
ADD setup.cfg /tmp/compile/setup.cfg
ADD . /tmp/compile/
RUN python setup.py install
RUN rm -rf minijson
WORKDIR /tmp
ADD tests /tmp/tests
CMD ["pytest"]
CMD ["pytest", "--cov=./", "--cov-report=xml"]
import os
from setuptools import find_packages
from distutils.core import setup
from snakehouse import Multibuild, build, find_pyx
from snakehouse import Multibuild, build, monkey_patch_parallel_compilation, find_pyx
monkey_patch_parallel_compilation()
build_kwargs = {}
directives = {'language_level': '3'}
dont_snakehouse = False
multi_kwargs = {}
if 'DEBUG' in os.environ:
print('Enabling debug mode')
dont_snakehouse = True
......@@ -15,6 +17,8 @@ if 'DEBUG' in os.environ:
profile=True,
linetrace=True,
binding=True)
multi_kwargs['define_macros'] = [('CYTHON_TRACE', '1'),
('CYTHON_TRACE_NOGIL', '1')]
import Cython.Compiler.Options
Cython.Compiler.Options.annotate = True
......@@ -23,7 +27,8 @@ if 'DEBUG' in os.environ:
setup(version='1.7',
packages=find_packages(include=['minijson', 'minijson.*']),
ext_modules=build([Multibuild('minijson', find_pyx('minijson'),
dont_snakehouse=dont_snakehouse), ],
dont_snakehouse=dont_snakehouse,
**multi_kwargs), ],
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.*',
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment