From a011468738b64e750117c5e9cb6e6d8fc268176a Mon Sep 17 00:00:00 2001
From: Bing Gong <gongbing1112@gmail.com>
Date: Mon, 9 Mar 2020 17:10:13 +0100
Subject: [PATCH] add gitlab-ci

---
 gitlab-ci.yml | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 gitlab-ci.yml

diff --git a/gitlab-ci.yml b/gitlab-ci.yml
new file mode 100644
index 00000000..2c5e5d3b
--- /dev/null
+++ b/gitlab-ci.yml
@@ -0,0 +1,68 @@
+stages:
+  - build
+  - test
+  - coverage
+  - deploy
+  - pages
+
+
+
+build:
+    tags: 
+     - linux
+    stage: build
+    script: 
+        - echo "Building"
+        - mkdir build
+        - touch build/info.txt
+
+
+test:
+    tags: 
+     - linux
+    stage: test
+    script:
+      - zypper --non-interactive install python3-pip
+      - zypper --non-interactive install python-devel
+      - pip install --upgrade pip
+      - pip install -r requirements.txt
+      - python3 test/test_DataMgr.py
+
+
+docs:
+    tags:
+        - linux
+    stage: deploy
+    script:
+        - zypper --non-interactive install python3-pip
+        - zypper --non-interactive install python3-devel
+        - pip install sphinx
+        - pip install --upgrade pip
+        - pip install -r requirements.txt
+        - mkdir documents
+        - cd docs
+        - make html
+        - cp -r _build/html/* ../documents/.
+        - cd ../documents
+        - ls -l
+    artifacts:
+        name: docs
+        paths:
+          - documents/
+        when: always
+        expire_in: 1 week
+
+pages:
+    tags:
+        - linux
+    stage: pages
+    script:
+      - mkdir -p public/docs
+      - cp -af documents/ public/docs/
+      - ls public/docs/
+    artifacts:
+      name: pages
+      when: always
+      paths:
+        - public/
+        - documents/
\ No newline at end of file
-- 
GitLab