Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
automatic_updates
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
automatic_updates
Commits
72dd01f3
Commit
72dd01f3
authored
1 year ago
by
Adam G-H
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3415291
: Run PHPStan on GitLab CI
parent
1bb711e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1018
Re-enable PHPStan job
Pipeline
#78907
failed
1 year ago
Stage: build
Stage: validate
Stage: test
Changes
2
Pipelines
7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+12
-6
12 additions, 6 deletions
.gitlab-ci.yml
phpstan.neon
+0
-0
0 additions, 0 deletions
phpstan.neon
with
12 additions
and
6 deletions
.gitlab-ci.yml
+
12
−
6
View file @
72dd01f3
...
...
@@ -51,7 +51,6 @@ include:
variables
:
_PHPUNIT_CONCURRENT
:
'
1'
_PHPUNIT_TESTGROUPS
:
'
'
SKIP_PHPSTAN
:
'
1'
# SKIP_ESLINT: '1'
...
...
@@ -101,20 +100,21 @@ variables:
#
###################################################################################
.extra-variables
:
&extra-variables
-
MODULE_DIR=$_WEB_ROOT/modules/custom/$CI_PROJECT_NAME
# Strip the `-dev` suffix out of $_TARGET_CORE to reveal the name of the Drupal core branch.
-
CORE_BRANCH=`echo $_TARGET_CORE | sed -e "s/-dev$//"`
composer
:
extends
:
.composer-base
before_script
:
-
composer archive --file=module
after_script
:
# Ensure the module is physically located within the document root, not just
# symlinked from it.
-
MODULE_DIR=$_WEB_ROOT/modules/custom/$CI_PROJECT_NAME
-
*extra-variables
-
rm -r -f $MODULE_DIR
-
mkdir -p $MODULE_DIR
-
tar -x -f module.tar -C $MODULE_DIR
-
rm module.tar
# Strip the `-dev` suffix out of $_TARGET_CORE to reveal the name of the Drupal core branch.
-
CORE_BRANCH=`echo $_TARGET_CORE | sed -e "s/-dev$//"`
-
git clone https://git.drupalcode.org/project/drupal.git --depth 1 --branch $CORE_BRANCH /tmp/drupal-core
-
mv /tmp/drupal-core/composer $_WEB_ROOT
...
...
@@ -123,6 +123,12 @@ phpcs:
# Use core's PHPCS configuration.
-
cp $_WEB_ROOT/core/phpcs.xml.dist .
phpstan
:
before_script
:
-
*extra-variables
# Ensure our PHPStan configuration has the correct include path to core's PHPStan configuration.
-
sed -i "s#%rootDir%/../../../#%rootDir%/../../../$_WEB_ROOT/#" $MODULE_DIR/phpstan.neon
phpunit
:
parallel
:
matrix
:
...
...
This diff is collapsed.
Click to expand it.
phpstan.neon
.dist
→
phpstan.neon
+
0
−
0
View file @
72dd01f3
File moved
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