diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0c13a4b038046b8e1c7409b411c31d69947cafed..6d3d840681e3bc2f6719ffdb03c14fad56c8bad8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,12 +1,8 @@
-before_script:
-  - bundle install
-
-stages:
-  - test
-
 test:
   script:
-    - bundle exec rake db:migrate RAILS_ENV=test
-    - bundle exec rake test RAILS_ENV=test
-  only:
-    - master
+  - apt-get update -qy
+  - apt-get install -y nodejs
+  - bundle install --path /cache
+  - bundle exec rake db:create RAILS_ENV=test
+  - bundle exec rake test
+