Updated pipeline
This commit is contained in:
@@ -3,7 +3,6 @@ image: node:lts-alpine
|
|||||||
stages:
|
stages:
|
||||||
- install
|
- install
|
||||||
- lint
|
- lint
|
||||||
- test
|
|
||||||
- build
|
- build
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@@ -30,35 +29,9 @@ lint:
|
|||||||
- node_modules
|
- node_modules
|
||||||
policy: pull
|
policy: pull
|
||||||
|
|
||||||
test:
|
|
||||||
stage: test
|
|
||||||
needs: ["install"]
|
|
||||||
before_script:
|
|
||||||
# Download Chrome
|
|
||||||
- apk add chromium
|
|
||||||
- export CHROME_BIN=/usr/bin/chromium-browser
|
|
||||||
- export CHROME_PATH=/usr/lib/chromium/
|
|
||||||
# Download Firefox
|
|
||||||
- apk add firefox-esr
|
|
||||||
- export FIREFOX_BIN=/usr/bin/firefox
|
|
||||||
- export FIREFOX_PATH=/usr/lib/firefox/
|
|
||||||
# X Server
|
|
||||||
- apk add xvfb
|
|
||||||
- export DISPLAY=:99
|
|
||||||
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
|
|
||||||
script:
|
|
||||||
- npm run test -- --browsers=Headless_Chrome --no-watch
|
|
||||||
cache:
|
|
||||||
key:
|
|
||||||
files:
|
|
||||||
- package.json
|
|
||||||
paths:
|
|
||||||
- node_modules
|
|
||||||
policy: pull
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
needs: ["test", "lint"]
|
needs: ["lint"]
|
||||||
script:
|
script:
|
||||||
- npm run build
|
- npm run build
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|||||||
Reference in New Issue
Block a user