-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
executable file
·183 lines (166 loc) · 6.61 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
################################################################################
# Gitlab CI integration for Drupal 8/9 project or module: tests, code quality,
# linting, metrics and deploy samples.
#
# Project: https://gitlab.com/mog33/gitlab-ci-drupal
# Documentation: https://mog33.gitlab.io/gitlab-ci-drupal
# Issues: https://gitlab.com/mog33/gitlab-ci-drupal/-/issues
# Author: Jean Valverde contact@dev-drupal.com
# License: GPL-3
#
# If you want to support this project, you can
# - Buy me a coffee: https://bit.ly/34jPKcE
# - Hire me as a freelance for any Drupal related work
# - Promote me to any company looking for any Drupal related work
# - Help me with testing / documentation / grammar fixes / use cases...
#
################################################################################
# The ref is relative to the version of the project to use.
include:
# If hosted on gitlab.com.
- project: 'mog33/gitlab-ci-drupal'
ref: 3.x-dev
file: '/.gitlab-ci/.gitlab-ci-template.yml'
# If hosted on an other Gitlab instance.
# - remote: 'https://gitlab.com/mog33/gitlab-ci-drupal/-/raw/3.x-dev/.gitlab-ci/.gitlab-ci-template.yml'
# If needed by your Gitlab-ci instance, you can set global tags for all jobs.
# default:
# tags:
# - docker
################################################################################
# Gitlab-CI variables documentation:
# https://docs.gitlab.com/ee/ci/variables/
#
# Variables, can be set here or on
# Gitlab CI UI > settings > CI/CD > variables
# UI take precedence on variables here.
# https://docs.gitlab.com/ee/ci/variables/README.html#priority-of-environment-variables
################################################################################
variables:
# This is mandatory to get default variables.
# For list of variables see
# https://gitlab.com/mog33/gitlab-ci-drupal/-/raw/3.x-dev/.gitlab-ci/ci/variables.yml
extends: .default_variables
# Minor Drupal version to work with, limited to tags on
# https://hub.docker.com/r/mogtofu33/drupal8ci/tags
CI_DRUPAL_VERSION:
value: "9.3"
description: The version of Drupal to use for this Pipeline.
# For a project based on Drupal this is 'web'. Can be 'docroot' on some
# distributions like 'varbase'.
DRUPAL_WEB_ROOT: web
##############################################################################
# Tests disabled by default because need a specific setup / configuration.
#
# Only needed if you have Behat tests, comment or set to 0 to enable.
# https://mog33.gitlab.io/gitlab-ci-drupal/advanced-usage/#behat-tests
SKIP_TEST_BEHAT: 1
# Can use a profile setup or a dump file in dump/
BEHAT_INSTALL_PROFILE: "minimal"
# Accessibility tests.
# https://mog33.gitlab.io/gitlab-ci-drupal/advanced-usage/#accessibility-with-pa11y
SKIP_TEST_PA11Y: 1
# Can use a profile setup or a dump file in dump/
PA11Y_INSTALL_PROFILE: "minimal"
# Only if you have Nightwatch tests in your code.
# https://mog33.gitlab.io/gitlab-ci-drupal/advanced-usage/#nightwatchjs
SKIP_TEST_NIGHTWATCH: 1
# Default is '--skiptags core', add your tag.
# NIGHTWATCH_TESTS: --tag my_module
# Phpunit tests to run, default provide only custom code or if this variable
# is empty all tests (including Drupal core).
# https://mog33.gitlab.io/gitlab-ci-drupal/advanced-usage/#phpunit-tests
PHPUNIT_TESTS: "custom"
# Specify a group of tests to run rather than all tests in the suite.
# PHPUNIT_GROUP: my_group_1,my_group_2
##############################################################################
# Override default variables for a module.
#
# Default CI setup is for a 'project' (full Drupal with a composer.json), next
# section contains common variables to change for a module (module, theme or
# profile). Simply uncomment and adapt dirs to set the CI for a module.
#
CI_TYPE: module
# Code quality dirs, must include your PHP code to check.
# Phpstan need autoloading, that's why we use web_root.
DIRS_QA: "${WEB_ROOT}/modules/custom"
# Eslint / Stylelint files to test.
DIRS_JS: "${CI_PROJECT_DIR}/js/*.js"
DIRS_CSS: "${CI_PROJECT_DIR}/css/*.css"
# Twig files to test.
DIRS_TWIG: "${CI_PROJECT_DIR}/templates"
# phpmetrics / phpstats dirs to include.
DIRS_PHP: "${CI_PROJECT_DIR}"
# Set SKIP_XXX variable to 1 to skip.
# Security is for a Drupal project with third party.
SKIP_TEST_SECURITY: 1
# If you don't have any css files, you can skip with
SKIP_LINT_CSS: 1
# If you don't have any javascript files, you can skip with
SKIP_LINT_JS: 1
# If you don't have any twig files, you can skip with
SKIP_LINT_TWIG: 1
#
##############################################################################
##############################################################################
# As a sample here is a list of some variables, see documentation for more
# variables.
#
# List of DIRS_* variables to define dirs to analyse for specific jobs.
# Code quality dirs, must include your PHP code to check.
#
# DIRS_QA: "${WEB_ROOT}/modules/custom,${WEB_ROOT}/themes/custom"
#
# Eslint / Stylelint files to test.
# Space separated for multiple folders.
# Default is to check files under all custom folders.
#
# DIRS_JS: "${WEB_ROOT}/**/custom/**/*.js"
# DIRS_CSS: "${WEB_ROOT}/**/custom/**/css/*.css"
#
# Twig files to test, recursive.
#
# DIRS_TWIG: "${WEB_ROOT}/themes/custom"
#
# Phpmetrics / Phpstats dirs to include.
# Default is to check all dirs.
#
# DIRS_PHP: "${WEB_ROOT}/modules/custom,${WEB_ROOT}/themes/custom"
#
# # ALL SKIP variables, uncomment and set to 1 to skip a job.
# SKIP_BUILD: 1 # if not running any tests or deploy.
#
# SKIP_TESTS: 1 # Skip all tests, ignore SKIP_TEST_*.
SKIP_TEST_UNITKERNEL: 1
# SKIP_TEST_FUNCTIONAL: 1
SKIP_TEST_FUNCTIONALJS: 1
# SKIP_TEST_SECURITY: 1
#
SKIP_QA: 1
#
# SKIP_LINT: 1 # Skip all lint, ignore SKIP_LINT_*.
# SKIP_LINT_CSS: 1
# SKIP_LINT_JS: 1
# SKIP_LINT_TWIG: 1
#
# SKIP_METRICS: 1
# QA and Metrics tools.
# See Phpqa available tools: https://github.com/EdgedesignCZ/phpqa#available-tools
# ':0' is the number of errors allowed, default here is very strict.
#
# TOOLS_QA: "phpcs:0,phpmd:0,parallel-lint:0,phpstan:0,phpcpd:0"
# TOOLS_METRICS: "phpmetrics,phploc,pdepend"
################################################################################
# Advanced usage with this file, see doc.
# https://mog33.gitlab.io/gitlab-ci-drupal/advanced-usage
################################################################################
stages:
- build
- tests
- metrics
- reports
pages:
stage: reports
extends: .simple_dashboard
rules:
- when: always