From 1dfedd09d68d0d7ae9f7397a6965efa9f87043e2 Mon Sep 17 00:00:00 2001 From: odweta Date: Mon, 7 Sep 2026 18:55:57 +0200 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20af6ba..485bac0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,12 +21,11 @@ stages: # List of stages for jobs, and their order of execution - test - deploy -services: - - docker:dind - build-job: # This job runs in the build stage, which runs first. stage: build - image: docker:latest + image: docker:27.5.1-cli + services: + - docker:dind script: - cd ./app - echo "Compiling the code..." @@ -35,16 +34,20 @@ build-job: # This job runs in the build stage, which runs first. unit-test-job: # This job runs in the test stage. stage: test # It only starts when the job in the build stage completes successfully. - image: npm:latest + image: node:22 script: - cd ./app + - echo "Installing dependencies..." + - npm install - echo "Running unit tests..." - npm test - echo "Code coverage is 90%" deploy-job: # This job runs in the deploy stage. stage: deploy # It only runs when *both* jobs in the test stage complete successfully. - image: docker:latest + image: docker:27.5.1-cli + services: + - docker:dind environment: production script: - cd ./app