.gitlab-ci.yml 1.42 KB
Newer Older
1
2
3
#services:
#  - docker:dind

Alexandre Morin's avatar
Alexandre Morin committed
4
stages:
5
  - tests
Alexandre Morin's avatar
Alexandre Morin committed
6
  - push
Alexandre Morin's avatar
Alexandre Morin committed
7

Alexandre Morin's avatar
Alexandre Morin committed
8
9
10
11
variables:
  npm_config_cache: /builds/cypress-io/cypress-example-docker-gitlab/.npm
  CYPRESS_CACHE_FOLDER: /builds/cypress-io/cypress-example-docker-gitlab/cache/Cypress

Alexandre Morin's avatar
Alexandre Morin committed
12
13
14
15
16
17
cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
    - .npm
    - cache/Cypress
    - node_modules
Alexandre Morin's avatar
Alexandre Morin committed
18

Alexandre Morin's avatar
Alexandre Morin committed
19
functional-test:cypress:
Alexandre Morin's avatar
Alexandre Morin committed
20
  image: cypress/base:10
21
  stage: tests
Alexandre Morin's avatar
Alexandre Morin committed
22
  script:
Alexandre Morin's avatar
Alexandre Morin committed
23
24
    - npm ci
    - $(npm bin)/cypress verify
Alexandre Morin's avatar
Alexandre Morin committed
25
    - $(npm bin)/cypress run
Alexandre Morin's avatar
Alexandre Morin committed
26
27
  only:
    - schedules
Alexandre Morin's avatar
Alexandre Morin committed
28
29
30
31
32
33
  artifacts:
    expire_in: 1 week
    when: always
    paths:
      - cypress/screenshots
      - cypress/videos
Alexandre Morin's avatar
Alexandre Morin committed
34

35
36
37
38
39
40
41
42
43
44
45
46
php-metrics:
  image: jakzal/phpqa
  stage: tests
  script: phpmetrics --report-html=var/php-metrics src
  artifacts:
    paths:
      - var/php-metrics/
  allow_failure: true

php-phpmd:
  image: jakzal/phpqa
  stage: tests
47
48
  script:
    - mkdir var/
49
    - phpmd src html phpmd.xml --reportfile var/phpmd.html --ignore-violations-on-exit
50
51
  artifacts:
    paths:
52
      - var/phpmd.html
53
54
55
56
57
  allow_failure: true

php-deprecation-detector:
  image: jakzal/phpqa
  stage: tests
Alexandre Morin's avatar
Alexandre Morin committed
58
  script:
59
    - deprecation-detector check src vendor/
60
61
  allow_failure: true

62

63
64
65
66
67
68
69
70
71
72
#build-dockerhub:
#  stage: push
#  script:
#    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
#    - docker build dockerfile/version/ -t "$CI_REGISTRY_IMAGE"
#    - docker push "$CI_REGISTRY_IMAGE"
#  only:
#    - feat/gitlab_ci
#  except:
#    - schedules