.gitlab-ci.yml 1.67 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
phpstan:
  image: jakzal/phpqa
  stage: tests
  script: phpstan analyse --level 2 -c ./ci/phpstan.neon src
  allow_failure: true

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
  script: phpmd src text ./ci/phpmd.xml
  artifacts:
    paths:
      - var/phpmd.html
  allow_failure: true

php-deprecation-detector:
  image: jakzal/phpqa
  stage: tests
Alexandre Morin's avatar
Alexandre Morin committed
62
  script:
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
    - deprecation-detector check src vendor
  allow_failure: true

php-cs-fixer:
  image: jakzal/phpqa
  stage: tests
  script:
    - ci/php-cs-fixer.sh
  artifacts:
    paths:
      - var/patch.diff
    expire_in: 24 hrs
    when: on_failure
  allow_failure: true

#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