From 7d940828cf1cdf8ae69719e2c0fde4a251603428 Mon Sep 17 00:00:00 2001
From: Marmaduke Woodman <marmaduke.woodman@univ-amu.fr>
Date: Thu, 13 Feb 2020 14:39:59 +0100
Subject: [PATCH 1/3] add dockerfile for running lib tests

---
 scientific_library/Dockerfile | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 scientific_library/Dockerfile

diff --git a/scientific_library/Dockerfile b/scientific_library/Dockerfile
new file mode 100644
index 000000000..38acd7d51
--- /dev/null
+++ b/scientific_library/Dockerfile
@@ -0,0 +1,17 @@
+FROM continuumio/miniconda3
+
+RUN apt-get -y update && apt-get -y install build-essential gcc
+
+RUN conda install python=3.7 nomkl numba scipy numpy networkx scikit-learn cython pip numexpr psutil \
+    pytest pytest-cov pytest-benchmark pytest-mock matplotlib \
+    psycopg2 pytables scikit-image==0.14.2 simplejson cherrypy docutils
+
+RUN apt-get install -y zip
+RUN cd /opt \
+ && wget -q https://zenodo.org/record/3497545/files/tvb_data_2_0_1.zip?download=1 -O tvb_data.zip \
+ && unzip tvb_data.zip \
+ && rm tvb_data.zip \
+ && cd tvb_data \
+ && python3 setup.py develop
+
+RUN pip install h5py>=2.10 tvb-gdist pytest-xdist
-- 
GitLab


From 8cda2987ce6b4d69442c6e4633fedcfc5711415f Mon Sep 17 00:00:00 2001
From: Marmaduke Woodman <marmaduke.woodman@univ-amu.fr>
Date: Thu, 13 Feb 2020 15:00:22 +0100
Subject: [PATCH 2/3] add minimal gh action

---
 .github/workflows/docker-lib-ci.yml | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 .github/workflows/docker-lib-ci.yml

diff --git a/.github/workflows/docker-lib-ci.yml b/.github/workflows/docker-lib-ci.yml
new file mode 100644
index 000000000..2c19f4856
--- /dev/null
+++ b/.github/workflows/docker-lib-ci.yml
@@ -0,0 +1,8 @@
+name: docker-based library testing
+on: [push]
+jobs:
+  build:
+    runs-on: tvb/library
+    steps:
+      - name: pytest library
+        run: ls
\ No newline at end of file
-- 
GitLab


From c67eba6664f972448106cab2e583248fa769af48 Mon Sep 17 00:00:00 2001
From: Marmaduke Woodman <marmaduke.woodman@univ-amu.fr>
Date: Thu, 13 Feb 2020 15:21:19 +0100
Subject: [PATCH 3/3] build & test

---
 .github/workflows/docker-lib-ci.yml | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/docker-lib-ci.yml b/.github/workflows/docker-lib-ci.yml
index 2c19f4856..10ab090e5 100644
--- a/.github/workflows/docker-lib-ci.yml
+++ b/.github/workflows/docker-lib-ci.yml
@@ -2,7 +2,10 @@ name: docker-based library testing
 on: [push]
 jobs:
   build:
-    runs-on: tvb/library
+    runs-on: ubuntu-latest
     steps:
-      - name: pytest library
-        run: ls
\ No newline at end of file
+      - uses: actions/checkout@v1
+      - name: Build image
+        run: docker build -f scientific_library/Dockerfile -t tvb/lib-ci scientific_library
+      - name: Run tests
+        run: docker run --rm -v $PWD:/work -w /work/scientific_library tvb/lib-ci pytest -Wignore -n8
\ No newline at end of file
-- 
GitLab