From 31f11bddb595e33034f2a54e2c0b7e6cb175441e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Sko=C5=99epa?= <jakub@skorepa.info>
Date: Sun, 10 Apr 2016 22:27:25 +0200
Subject: [PATCH] Add CI steps to run unittests and simple test

simple test = just compile example site
---
 .gitlab-ci.yml | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f480880..a39cfc0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,8 +1,35 @@
+stages:
+  - test
+  - deploy
+
 trigger:
+  stage: deploy
   only:
     - master
   script:
     - "curl -X POST -F token=$GITLAB_TOKEN -F ref=master https://git.ok1kvk.cz/api/v3/projects/72/trigger/builds"
 
+before_script:
+  - node --version
+  - npm --version
+  - npm install
+
+basictest:
+  stage: test
+  script:
+    - node index.js --contentdir sitegin/tests/content --staticdir sitegin/tests/static --builddir build --noserver
+
+unittest:
+  stage: test
+  script:
+    - npm test
+  artifacts:
+    paths:
+      - coverage
+
+cache:
+  paths:
+    - node_modules
+
 # needs following env variable: $GITLAB_TOKEN
     
-- 
GitLab