From 4208d1315e5f53f0787e20f4762bcefe02cb697b Mon Sep 17 00:00:00 2001 From: emjohansen <54023083+emjohansen@users.noreply.github.com> Date: Wed, 28 Apr 2021 13:14:45 +0200 Subject: [PATCH] dsadas --- .gitlab-ci.yml | 26 ++++++++++++-------------- .gitlab-cy.yml | 28 +++++++++++++--------------- 2 files changed, 25 insertions(+), 29 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ba12867..3eec1d2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,27 +1,25 @@ 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 + - node_modules/ + - .npm/ + test: image: cypress/browsers:node12.14.1-chrome85-ff81 stage: test script: - # install dependencies - - npm ci - # Kjør express-serveren i bakgrunnen - - npm start & - # Kjør testene - - npm test + # install dependencies + - npm ci + # start the server in the background + - npm run start:ci & + # run Cypress tests + - npm start artifacts: when: always paths: - - cypress/videos - - cypress/screenshots + - cypress/videos/**/*.mp4 + - cypress/screenshots/**/*.png expire_in: 1 day \ No newline at end of file diff --git a/.gitlab-cy.yml b/.gitlab-cy.yml index 5f7d4df..3eec1d2 100644 --- a/.gitlab-cy.yml +++ b/.gitlab-cy.yml @@ -1,27 +1,25 @@ 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 + - node_modules/ + - .npm/ + test: image: cypress/browsers:node12.14.1-chrome85-ff81 stage: test script: - # install dependencies - - npm ci - # Kjør express-serveren i bakgrunnen - - npm start & - # Kjør testene - - npm test + # install dependencies + - npm ci + # start the server in the background + - npm run start:ci & + # run Cypress tests + - npm start artifacts: when: always paths: - - cypress/videos - - cypress/screenshots - expire_in: 1 day \ No newline at end of file + - cypress/videos/**/*.mp4 + - cypress/screenshots/**/*.png + expire_in: 1 day \ No newline at end of file -- GitLab