From b1d7e88dbb76055a9fb2e6b2479e879121bff723 Mon Sep 17 00:00:00 2001 From: Albin Henriksson <albhe428@student.liu.se> Date: Tue, 16 Feb 2021 10:52:02 +0100 Subject: [PATCH] #2 add .gitlab-ci.yml file --- .gitlab-ci.yml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..8e8be239 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,58 @@ +image: node:10 + +stages: + - install + - build + - quality + +install: + stage: install + script: + - npm install + artifacts: + name: "artifacts" + untracked: true + expire_in: 60 mins + paths: + - .npm/ + - node_modules/ + +build: + stage: build + script: + - CI=false npm run build + artifacts: + paths: + - build + expire_in: 60 mins + dependencies: + - install + +linting: + stage: quality + script: + - npm run lint + dependencies: + - install + +test:unit: + stage: quality + script: + - npm run test:coverage + dependencies: + - install + coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/ + +test:e2e: + stage: quality + image: cypress/browsers:chrome69 + dependencies: + - install + - build + script: + - npm run e2e:ci + artifacts: + paths: + - cypress/screenshots + - cypress/videos + expire_in: 1 day -- GitLab