summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-08-13 16:55:30 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-08-13 16:55:30 +0200
commit7a3216f2832f452dbcd79fee3cfcea2306e0c55b (patch)
tree7e00750408155829d49b8938bf38f962322edca6 /.gitlab-ci.yml
parent882a9b84a7ab9a1c2b53a272ba1380547088ea3d (diff)
GitLab CI: Add experimental coverage analysis
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml13
1 files changed, 11 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3ff619b..4ae7840 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,12 +2,13 @@ image: debian:buster
stages:
- test
+ - coverage
test:
stage: test
script:
- apt-get update -qy
- - apt-get install -y python3-dev python3-numpy python3-scipy python3-pytest python3-sklearn python3-yaml wget
+ - apt-get install -y python3-dev python3-coverage python3-numpy python3-scipy python3-pytest python3-sklearn python3-yaml wget
- mkdir test-data
- wget -qO test-data/20161221_123347_mmparam.tar https://lib.finalrewind.org/energy-models/20161221_123347_mmparam.tar
- wget -qO test-data/20170116_124500_LM75x.tar https://lib.finalrewind.org/energy-models/20170116_124500_LM75x.tar
@@ -18,4 +19,12 @@ test:
- wget -qO test-data/20170116_151348_sharpLS013B4DN.tar https://lib.finalrewind.org/energy-models/20170116_151348_sharpLS013B4DN.tar
- wget -qO test-data/20170220_164723_RF24_int_A.tar https://lib.finalrewind.org/energy-models/20170220_164723_RF24_int_A.tar
- wget -qO test-data/20190726_150423_nRF24_no-rx.json https://lib.finalrewind.org/energy-models/20190726_150423_nRF24_no-rx.json
- - PYTHONPATH=lib pytest-3
+ - PYTHONPATH=lib pytest-3 --cov=lib
+
+coverage:
+ stage: coverage
+ script: python3-coverage html
+ artifacts:
+ paths:
+ - htmlcov/
+ expire_in: 1 week