From b6b4524d3d4a2006cdda7d6e3ae003cab1bbf59c Mon Sep 17 00:00:00 2001 From: linestaa <lineesta@stud.ntnu.no> Date: Thu, 9 May 2024 12:54:59 +0200 Subject: [PATCH] lagt til ny yml --- .gitlab-ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e69de29b..61a9473c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -0,0 +1,29 @@ +stages: + - test + +variables: + npm_config_cache: "$CI_PROJECT_DIR/.npm" + CYPRESS_CACHE_FOLDER: "$CI_PROJECT_DIR/cache/Cypress" + +cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - .npm + - cache/Cypress + - node_modules + +test: + image: cypress/base:10 + stage: test + script: + # install dependencies + - npm ci + # Run the express server in the background + - npm start & + # Run the tests + - npm test + artifacts: + when: always + paths: + - cypress/videos + expire_in: 1 day \ No newline at end of file -- GitLab