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
f4848230
Commit
f4848230
authored
10 months ago
by
mscieszka
Committed by
Fran Garcia-Linares
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3437397
by mscieszka, fjgarlin, jonathan1055: Add phpstan (max PHP version) job
parent
6e8ae8a1
No related branches found
No related tags found
1 merge request
!169
Issue #3437397: Add "phpstan (max PHP version)" job
Pipeline
#135382
passed
10 months ago
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/jobs.md
+1
-0
1 addition, 0 deletions
docs/jobs.md
docs/jobs/phpstan.md
+4
-0
4 additions, 0 deletions
docs/jobs/phpstan.md
includes/include.drupalci.main.yml
+12
-0
12 additions, 0 deletions
includes/include.drupalci.main.yml
with
17 additions
and
0 deletions
docs/jobs.md
+
1
−
0
View file @
f4848230
...
...
@@ -64,6 +64,7 @@ Each job will run or not run according to the following rules:
| phpcs | SKIP_PHPCS=0 | SKIP_PHPCS=1 |
| stylelint | SKIP_STYLELINT=0 | SKIP_STYLELINT=1 |
| phpstan | SKIP_PHPSTAN=0 && OPT_IN_TEST_CURRENT=1 | SKIP_PHPSTAN=1
\|\|
OPT_IN_TEST_CURRENT=0 |
| phpstan (max PHP version) | SKIP_PHPSTAN=0 && OPT_IN_TEST_MAX_PHP=1 | SKIP_PHPSTAN=1
\|\|
OPT_IN_TEST_MAX_PHP=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 |
| nightwatch | SKIP_NIGHTWATCH=0 && OPT_IN_TEST_CURRENT=1 | SKIP_NIGHTWATCH=1
\|\|
OPT_IN_TEST_CURRENT=0 |
...
...
This diff is collapsed.
Click to expand it.
docs/jobs/phpstan.md
+
4
−
0
View file @
f4848230
...
...
@@ -7,3 +7,7 @@ If there is a baseline file in the module it will use it, but if there isn't, it
It will offer a baseline file for module maintainers to add it to their projects to make adoption easier.
If you do not want it to run in your contrib module, you just need to set
`SKIP_PHPSTAN`
to 1.
This job allows multiple variants to check current and future versions of Drupal, as well as the maximum PHP version.
Consider the PHP version when interpreting the results of the PHPStan job, as the analysis may give different results between major versions of PHP.
This diff is collapsed.
Click to expand it.
includes/include.drupalci.main.yml
+
12
−
0
View file @
f4848230
...
...
@@ -429,6 +429,7 @@ phpcs:
export PHPSTAN_CONFIGURATION=""
[[ -f $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME/phpstan.neon ]] && export PHPSTAN_CONFIGURATION="--configuration=$_WEB_ROOT/modules/custom/$CI_PROJECT_NAME/phpstan.neon"
-
php vendor/bin/phpstan --version
-
php --version
# Rely on PHPStan caching to execute analysis multiple times without performance drawback.
# Output a copy in junit.
-
php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION --error-format=junit > junit.xml ||
true
...
...
@@ -460,6 +461,17 @@ phpcs:
phpstan
:
extends
:
.phpstan-base
phpstan (max PHP version)
:
extends
:
phpstan
rules
:
-
*opt-in-max-php-rule
-
*skip-phpstan-rule
-
when
:
on_success
needs
:
-
"
composer
(max
PHP
version)"
variables
:
_TARGET_PHP
:
$CORE_PHP_MAX
phpstan (next minor)
:
extends
:
phpstan
rules
:
...
...
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