Skip to content
Snippets Groups Projects
Commit 3606a1be authored by Denis Arrivault's avatar Denis Arrivault
Browse files

Adding gitlab-ci configuration file

parent 31dd832a
No related branches found
No related tags found
No related merge requests found
Pipeline #
# CI Config for ltaftpy / gitlab
stages:
- build
- test
# Global runner/docker image definition
image: ubuntu:latest
# Global caching
cache:
key: "cache"
paths:
# apt
- apt-cache
#
# build
- build
before_script:
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
- export SITE_PACKAGES=`pwd`/site_packages && mkdir -pv $SITE_PACKAGES
- export PYTHONPATH=$PYTHONPATH:$SITE_PACKAGES
- apt-get update -yq && apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y cmake libfftw3-dev
- apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y liblapack-dev python3.6 python3.6-dev python3-pip
- pip3 install --target=$SITE_PACKAGES scipy matplotlib nose coverage
# Main build
build:
stage: build
tags:
- docker
script:
- pip3 install --target=$SITE_PACKAGES -e .
# Tests
test:
stage: test
tags:
- docker
dependencies:
- build
script:
- nosetests
artifacts:
paths:
# Tests report
- build/nosetests.xml
# Tests coverage report
- build/htmlcov/
expire_in: 8d
\ No newline at end of file
[nosetests] [nosetests]
#verbosity=1 #verbosity=1
where=./ltfatpy where=./ltfatpy
with-xunit=1
xunit-file=./build/nosetests.xml
with-coverage=1 with-coverage=1
cover-package=ltfatpy cover-package=ltfatpy
cover-erase=1 cover-erase=1
cover-html=1 cover-html=1
cover-html-dir=../htmlcov cover-html-dir=../build/htmlcov
[pytest] [pytest]
# Specifies a minimal pytest version required for running tests. # Specifies a minimal pytest version required for running tests.
...@@ -19,4 +21,5 @@ norecursedirs = .git bin build cmake-modules ltfat_C_kernel sandboxes .settings ...@@ -19,4 +21,5 @@ norecursedirs = .git bin build cmake-modules ltfat_C_kernel sandboxes .settings
source=./ltfatpy source=./ltfatpy
omit = ./ltfatpy/tests/* omit = ./ltfatpy/tests/*
[coverage html] [coverage html]
directory=../htmlcov directory=../build/htmlcov
\ No newline at end of file
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