Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gitlab_templates
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
gitlab_templates
Commits
06bfa0a9
Commit
06bfa0a9
authored
1 year ago
by
Fran Garcia-Linares
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3405955
by jonathan1055, fjgarlin: Add job for CSPELL in contrib pipeline
parent
2c6bda50
Branches
Branches containing commit
Tags
1.2.0
Tags containing commit
1 merge request
!128
Add job for CSPELL
Pipeline
#100261
passed
1 year ago
Stage: test
Changes
4
Pipelines
6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
README.MD
+3
-2
3 additions, 2 deletions
README.MD
includes/include.drupalci.main.yml
+36
-1
36 additions, 1 deletion
includes/include.drupalci.main.yml
includes/include.drupalci.variables.yml
+8
-0
8 additions, 0 deletions
includes/include.drupalci.variables.yml
with
48 additions
and
3 deletions
CHANGELOG.md
+
1
−
0
View file @
06bfa0a9
...
...
@@ -2,6 +2,7 @@
## 1.2.0 - 2024-02-16
#3405955 - Add job for CSPELL in contrib pipeline.\
#3405813 - Create downloadable patch for ESLINT automated fixes.\
#3419069 - Tidy up template and remove redundant lines.\
#3421674 - Add condition for mariadb.\
...
...
This diff is collapsed.
Click to expand it.
README.MD
+
3
−
2
View file @
06bfa0a9
...
...
@@ -52,16 +52,17 @@ Each job will run or not run according to the following rules:
| JOB NAME | Conditions when it will run | Conditions when it will NOT run |
| --------------------------- | ------------------------------------------------------- | --------------------------------------------------------- |
| composer | SKIP_COMPOSER_LINT=0
\|\|
SKIP_PHPCS=0
\|\|
<br>
SKIP_STYLELINT=0
\|\|
SKIP_ESLINT=0
\|\|
<br>
OPT_IN_TEST_CURRENT=1 | SKIP_COMPOSER_LINT=1 && SKIP_PHPCS=1 &&
<br>
SKIP_STYLELINT=1 && SKIP_ESLINT=1 &&
<br>
OPT_IN_TEST_CURRENT=0 |
| composer | SKIP_COMPOSER_LINT=0
\|\|
SKIP_PHPCS=0
\|\|
<br>
SKIP_STYLELINT=0
\|\|
SKIP_ESLINT=0
\|\|
<br>
SKIP_CSPELL=0
\|\|
OPT_IN_TEST_CURRENT=1 | SKIP_COMPOSER_LINT=1 && SKIP_PHPCS=1 &&
<br>
SKIP_STYLELINT=1 && SKIP_ESLINT=1 &&
<br>
SKIP_CSPELL=1 &&
OPT_IN_TEST_CURRENT=0 |
| composer (max PHP version) | OPT_IN_TEST_MAX_PHP=1 | OPT_IN_TEST_MAX_PHP=0 |
| composer (previous minor) | OPT_IN_TEST_PREVIOUS_MINOR=1 | OPT_IN_TEST_PREVIOUS_MINOR=0 |
| composer (previous major) | OPT_IN_TEST_PREVIOUS_MAJOR=1 | OPT_IN_TEST_PREVIOUS_MAJOR=0 |
| composer (next minor) | OPT_IN_TEST_NEXT_MINOR=1 | OPT_IN_TEST_NEXT_MINOR=0 |
| composer (next major) | OPT_IN_TEST_NEXT_MAJOR=1 | OPT_IN_TEST_NEXT_MAJOR=0 |
| composer-lint | SKIP_COMPOSER_LINT=0 | SKIP_COMPOSER_LINT=1 |
| cspell | SKIP_CSPELL=0 | SKIP_CSPELL=1 |
| eslint | SKIP_ESLINT=0 | SKIP_ESLINT=1 |
| phpcs | SKIP_PHPCS=0 | SKIP_PHPCS=1 |
| stylelint | SKIP_STYLELINT=0 | SKIP_STYLELINT=1 |
| eslint | SKIP_ESLINT=0 | SKIP_ESLINT=1 |
| phpstan | SKIP_PHPSTAN=0 && OPT_IN_TEST_CURRENT=1 | SKIP_PHPSTAN=1
\|\|
OPT_IN_TEST_CURRENT=0 |
| phpstan (next minor) | SKIP_PHPSTAN=0 && OPT_IN_TEST_NEXT_MINOR=1 | SKIP_PHPSTAN=1
\|\|
OPT_IN_TEST_NEXT_MINOR=0 |
| phpstan (next major) | SKIP_PHPSTAN=0 && OPT_IN_TEST_NEXT_MAJOR=1 | SKIP_PHPSTAN=1
\|\|
OPT_IN_TEST_NEXT_MAJOR=0 |
...
...
This diff is collapsed.
Click to expand it.
includes/include.drupalci.main.yml
+
36
−
1
View file @
06bfa0a9
...
...
@@ -85,7 +85,7 @@
# If none of these are set then it is not needed. This rule is only used in the 'base' Composer job,
# it is not added to any of the Composer variants because they each have their specific 'opt-in' rule.
.check-current-composer-not-needed-rule
:
&check-current-composer-not-needed-rule
if
:
'
$SKIP_COMPOSER_LINT
==
"1"
&&
$SKIP_PHPCS
==
"1"
&&
$SKIP_STYLELINT
==
"1"
&&
$SKIP_ESLINT
==
"1"
&&
$OPT_IN_TEST_CURRENT
==
"0"'
if
:
'
$SKIP_COMPOSER_LINT
==
"1"
&&
$SKIP_PHPCS
==
"1"
&&
$SKIP_STYLELINT
==
"1"
&&
$SKIP_ESLINT
==
"1"
&&
$SKIP_CSPELL
==
"1"
&&
$OPT_IN_TEST_CURRENT
==
"0"'
when
:
never
.skip-phpstan-rule
:
&skip-phpstan-rule
...
...
@@ -120,6 +120,10 @@
if
:
'
$SKIP_NIGHTWATCH
==
"1"'
when
:
never
.skip-cspell-rule
:
&skip-cspell-rule
if
:
'
$SKIP_CSPELL
==
"1"'
when
:
never
.opt-in-current-rule
:
&opt-in-current-rule
if
:
'
$OPT_IN_TEST_CURRENT
!=
"1"'
when
:
never
...
...
@@ -538,6 +542,37 @@ eslint:
reports
:
junit
:
junit.xml
cspell
:
stage
:
validate
rules
:
-
*skip-cspell-rule
-
when
:
on_success
allow_failure
:
true
needs
:
-
composer
artifacts
:
expose_as
:
junit
expire_in
:
6 mos
when
:
always
name
:
artifacts-$CI_PIPELINE_ID-$CI_JOB_NAME_SLUG
paths
:
-
_cspell_unrecognized_words_$CI_PIPELINE_ID.txt
script
:
-
cd $CI_PROJECT_DIR/$_WEB_ROOT/modules/custom/$CI_PROJECT_NAME
-
test -f .cspell.json || printf '{"words":[%s]}\n' "$_CSPELL_WORDS" > .cspell.json
-
$CI_PROJECT_DIR/$_WEB_ROOT/core/node_modules/.bin/cspell -c .cspell.json --show-suggestions --show-context --no-progress ** || EXIT_CODE=$?
-
WORDS_FILE=_cspell_unrecognized_words_$CI_PIPELINE_ID.txt
-
touch $CI_PROJECT_DIR/$WORDS_FILE
-
|
if [ "$EXIT_CODE" != "" ]; then
# There are some unrecognized words so create an artifact file containing the unique list.
echo "# CSPELL Unrecognized or mis-spelled words.\n# You may want to add some of these to your custom project dictionary" >> $CI_PROJECT_DIR/$WORDS_FILE
$CI_PROJECT_DIR/$_WEB_ROOT/core/node_modules/.bin/cspell -c .cspell.json --words-only --unique --no-progress ** | sort --ignore-case >> $CI_PROJECT_DIR/$WORDS_FILE || true
echo "An artifact file has been created containing a unique list of the unrecognized words, for you to browse or download."
fi
-
echo "Exiting with EXIT_CODE=$EXIT_CODE"
-
exit $EXIT_CODE
################
# Test Jobs
################
...
...
This diff is collapsed.
Click to expand it.
includes/include.drupalci.variables.yml
+
8
−
0
View file @
06bfa0a9
...
...
@@ -72,6 +72,10 @@ variables:
value
:
"
"
description
:
"
Additional
options
that
are
appended
to
the
`stylelint`
job
call."
_CSPELL_WORDS
:
value
:
"
"
description
:
"
Words
to
add
to
the
cspell
dictionary
if
the
project
does
not
have
a
'.cspell.json'
file.
Use
double
quotes
and
comma
separation,
for
example
\"
drupal
\"
,
\"
keycdn
\"
."
_SHOW_ENVIRONMENT_VARIABLES
:
value
:
"
0"
description
:
"
Set
to
1
to
show
all
the
environment
variables
in
the
Composer
and
PhpUnit
jobs.
Known
variables
with
Personal
Identifiable
Information
will
still
be
hidden.
The
default
is
0
for
no
output
at
all."
...
...
@@ -115,6 +119,10 @@ variables:
value
:
"
0"
description
:
"
Set
to
1
to
skip
the
ESLINT
CI
job"
SKIP_CSPELL
:
value
:
"
0"
description
:
"
Set
to
1
to
skip
the
cspell
CI
job"
SKIP_PHPUNIT
:
value
:
"
0"
description
:
"
Set
to
1
to
skip
the
PHPUNIT
CI
job"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment