From e6f09fe0011997b32a2eb86abc09bd62e8e13c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20Dahlstr=C3=B8m?= <mathias.dahlstroem@gmail.com> Date: Wed, 5 May 2021 21:29:57 +0200 Subject: [PATCH] Legger til gitlab CI yml fil --- .gitlab-ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..1b1acaf --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,32 @@ +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: + # i dependencies + - npm ci + + # Kjør express-serveren i bakgrunnen (& er i bakgrunnen) + - npm start & + + # Kjør testene + - npm test + artifacts: + when: always + paths: + - cypress/videos + - cypress/screenshots + expire_in: 1 day -- GitLab