diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..61a9473ccda500074c3045b5eb00acfa65b5f479 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