This repository has been archived by the owner on May 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
44 lines (37 loc) · 1.28 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
image: "florenttorregrosa/ci-php:7.3-cli-alpine"
stages:
- build dev
- test
# Cache downloaded and built files in between jobs.
cache:
# Cache per commit so two pipelines won't interfere.
key: ${CI_COMMIT_SHORT_SHA}
paths:
- app/
- vendor/
# Build sources once and for all jobs and stages.
# This build is done with development tools included.
# Warning: if there are stages to deploy on one or more environments, You should
# include a new stage to remove tests and tools dependencies.
build dev:
stage: build dev
script:
- composer install --ignore-platform-reqs --no-progress --no-suggest
'Code quality: PHP CS':
stage: test
script:
- ./vendor/bin/phpcs --standard=./scripts/quality/phpcs.xml.dist
'Code quality: PHP MD':
stage: test
script:
- ./vendor/bin/phpmd ./app/modules/custom,./app/profiles/custom,./app/themes/custom ansi ./scripts/quality/phpmd.xml.dist --suffixes inc,info,install,module,php,profile,test,theme
'Code quality: Drupal check':
stage: test
script:
- ./vendor/bin/drupal-check app/modules/custom app/profiles/custom app/themes/custom
workflow:
rules:
# Execute jobs in merge request context.
- if: $CI_MERGE_REQUEST_ID
# Execute jobs when a new commit is pushed to 8.x branch.
- if: $CI_COMMIT_BRANCH == '8.x'