summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com>2020-08-28 17:41:51 +0200
committerGitHub <noreply@github.com>2020-08-28 17:41:51 +0200
commit6e14ef1f31e09f3875316440303450ff870d9881 (patch)
tree57fcc3e68f4b16af4e2afd6f38f6756fe6b8ad02
parentaabeed3df85d33b42bff8bbc55e93f363e84c3a8 (diff)
parent4e794277bfa2158ecaeb7e9db303b92ec84a2f3c (diff)
Merge pull request #383 from VincentRouvreau/python_code_coverage
python code coverage on CI
-rw-r--r--.circleci/config.yml79
-rw-r--r--.github/test-requirements.txt1
-rw-r--r--Dockerfile_for_circleci_image3
3 files changed, 45 insertions, 38 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index b04efd52..285a66a5 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -8,11 +8,11 @@ jobs:
- run:
name: Build and test examples
command: |
- mkdir build;
- cd build;
- cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=ON -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF ..;
- make all;
- ctest --output-on-failure;
+ mkdir build
+ cd build
+ cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=ON -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF ..
+ make all
+ ctest --output-on-failure
tests:
docker:
@@ -22,11 +22,11 @@ jobs:
- run:
name: Build and test unitary tests
command: |
- mkdir build;
- cd build;
- cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=ON -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF ..;
- make all;
- ctest --output-on-failure;
+ mkdir build
+ cd build
+ cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=ON -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF ..
+ make all
+ ctest --output-on-failure
utils:
docker:
@@ -36,11 +36,11 @@ jobs:
- run:
name: Build and test utilities
command: |
- mkdir build;
- cd build;
- cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=ON -DWITH_GUDHI_PYTHON=OFF ..;
- make all;
- ctest --output-on-failure;
+ mkdir build
+ cd build
+ cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=ON -DWITH_GUDHI_PYTHON=OFF ..
+ make all
+ ctest --output-on-failure
python:
docker:
@@ -52,24 +52,26 @@ jobs:
command: |
git submodule init
git submodule update
- mkdir build;
- cd build;
- cmake -DUSER_VERSION_DIR=version ..;
- make user_version;
- cd version;
- mkdir build;
- cd build;
- cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=ON -DPython_ADDITIONAL_VERSIONS=3 ..;
- cd python;
- python3 setup.py build_ext --inplace;
- make sphinx;
- cp -R sphinx /tmp/sphinx;
- python3 setup.py install;
- python3 setup.py clean --all;
- ctest -j 2 --output-on-failure;
-
+ mkdir build
+ cd build
+ cmake -DUSER_VERSION_DIR=version ..
+ make user_version
+ cd version
+ cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=ON -DPython_ADDITIONAL_VERSIONS=3 .
+ cd python
+ python3 setup.py build_ext --inplace
+ make sphinx
+ cp -R sphinx /tmp/sphinx
+ python3 setup.py install
+ python3 setup.py clean --all
+ python3 -B -m pytest test/*.py --cov-report html --cov=gudhi
+ cp -R htmlcov /tmp/htmlcov
- store_artifacts:
path: /tmp/sphinx
+ destination: sphinx
+ - store_artifacts:
+ path: /tmp/htmlcov
+ destination: htmlcov
doxygen:
docker:
@@ -81,16 +83,17 @@ jobs:
command: |
git submodule init
git submodule update
- mkdir build;
- cd build;
- cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF -DUSER_VERSION_DIR=version ..;
- make doxygen 2>&1 | tee dox.log;
- grep warning dox.log;
- cp dox.log version/doc/html/;
- cp -R version/doc/html /tmp/doxygen;
+ mkdir build
+ cd build
+ cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GUDHI_EXAMPLE=OFF -DWITH_GUDHI_TEST=OFF -DWITH_GUDHI_UTILITIES=OFF -DWITH_GUDHI_PYTHON=OFF -DUSER_VERSION_DIR=version ..
+ make doxygen 2>&1 | tee dox.log
+ grep warning dox.log
+ cp dox.log version/doc/html/
+ cp -R version/doc/html /tmp/doxygen
- store_artifacts:
path: /tmp/doxygen
+ destination: doxygen
workflows:
version: 2
diff --git a/.github/test-requirements.txt b/.github/test-requirements.txt
index 98f1007e..7d69c0b9 100644
--- a/.github/test-requirements.txt
+++ b/.github/test-requirements.txt
@@ -1,4 +1,5 @@
pytest
+pytest-cov
sphinx
sphinxcontrib-bibtex
sphinx-paramlinks
diff --git a/Dockerfile_for_circleci_image b/Dockerfile_for_circleci_image
index 464097e7..87f57071 100644
--- a/Dockerfile_for_circleci_image
+++ b/Dockerfile_for_circleci_image
@@ -23,6 +23,9 @@ ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
+# Update again
+RUN apt-get update
+
# Required for Gudhi compilation
RUN apt-get install -y make \
git \