From f9387bc4fdb176aae8c06c29a17ecb499e6f052c Mon Sep 17 00:00:00 2001
From: Steve Reis <stevereis@gmail.com>
Date: Fri, 10 Sep 2021 15:30:50 +0200
Subject: [PATCH] Added run tests in the dockerfile

---
 api/dockerfile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/api/dockerfile b/api/dockerfile
index 886200b..885dc3f 100644
--- a/api/dockerfile
+++ b/api/dockerfile
@@ -4,12 +4,14 @@ WORKDIR /usr/src/app
 
 COPY package*.json ./
 
-RUN npm install --only=development
+RUN npm ci --development
 
 COPY . .
 
 RUN npm run build
 
+RUN npm run test
+
 FROM node:12.13-alpine as production
 
 ARG NODE_ENV=production
@@ -19,7 +21,7 @@ WORKDIR /usr/src/app
 
 COPY package*.json ./
 
-RUN npm install --only=production
+RUN npm ci --production
 
 COPY . .
 
-- 
GitLab