From 157fa666f746eeb72982c748bcebfce8ae3af4da Mon Sep 17 00:00:00 2001
From: u214892 <u214892@sbb.ch>
Date: Mon, 17 Jun 2019 23:07:56 +0200
Subject: [PATCH] #65 run benchmarks and profiling only in scheduled nightly
 pipeline

---
 .gitlab-ci.yml | 16 ++++++++++++++++
 tox.ini        |  2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5899b8ae..48559f88 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -47,3 +47,19 @@ build_and_deploy_docs:
     environment:
         name: ${CI_COMMIT_REF_SLUG}
         url: http://${BUCKET_NAME}.s3-website.${AWS_DEFAULT_REGION}.amazonaws.com/
+
+benchmarks_and_profiling:
+    dependencies:
+        - tests
+    stage: tests
+    only:
+#        - master
+          variables:
+            - $BENCHMARKS_AND_PROFILING
+    script:
+        - apt update
+        - apt install -y libgl1-mesa-glx xvfb graphviz xdg-utils libcairo2-dev libjpeg-dev libgif-dev
+        - pip install tox
+        - xvfb-run tox -e benchmarks -v --recreate
+
+
diff --git a/tox.ini b/tox.ini
index a347bce1..f933d793 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = py36, py37, examples, notebooks, flake8, docs, coverage, benchmarks
+envlist = py36, py37, examples, notebooks, flake8, docs, coverage
 
 [travis]
 python =
-- 
GitLab