.gitlab-ci.yml 929 Bytes
Newer Older
lain's avatar
ci.  
lain committed
1 2 3
# This file is a template, and might need editing before it works on your project.
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
lain's avatar
lain committed
4
image: node:8-jessie
lain's avatar
ci.  
lain committed
5

lambadalambda's avatar
lambadalambda committed
6
stages:
lain's avatar
lain committed
7
  - lint
lambadalambda's avatar
lambadalambda committed
8 9
  - build
  - test
10
  - deploy
lambadalambda's avatar
lambadalambda committed
11

lain's avatar
lain committed
12 13 14 15 16 17
lint:
  stage: lint
  script:
    - yarn
    - npm run lint

lain's avatar
ci.  
lain committed
18
test:
lambadalambda's avatar
lambadalambda committed
19
  stage: test
HJ's avatar
HJ committed
20 21
  variables:
    APT_CACHE_DIR: apt-cache
lain's avatar
ci.  
lain committed
22
  script:
HJ's avatar
HJ committed
23 24 25
    - mkdir -pv $APT_CACHE_DIR && apt-get -qq update
    - apt install firefox-esr -y --no-install-recommends
    - firefox --version
lambadalambda's avatar
lambadalambda committed
26
    - yarn
HJ's avatar
HJ committed
27
    - yarn unit
lain's avatar
lain committed
28

lain's avatar
ci.  
lain committed
29
build:
lambadalambda's avatar
lambadalambda committed
30
  stage: build
lain's avatar
ci.  
lain committed
31
  script:
lambadalambda's avatar
lambadalambda committed
32
    - yarn
lain's avatar
ci.  
lain committed
33
    - npm run build
lain's avatar
lain committed
34 35 36
  artifacts:
    paths:
    - dist/
37 38 39 40 41 42 43 44 45 46

docs-deploy:
  stage: deploy
  image: alpine:latest
  only:
  - develop@pleroma/pleroma-fe
  before_script:
  - apk add curl
  script:
  - curl -X POST -F"token=$DOCS_PIPELINE_TRIGGER" -F'ref=master' https://git.pleroma.social/api/v4/projects/673/trigger/pipeline