Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gitlab-ci
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
gitlab-ci
Commits
f8ceef9b
Verified
Commit
f8ceef9b
authored
9 months ago
by
Bartek Jaskulski
Browse files
Options
Downloads
Patches
Plain Diff
feat: display static analysis in reports
Signed-off-by:
Bart Jaskulski
<
bjaskulski@protonmail.com
>
parent
04e6b926
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
gitlab-ci-1.2.yml
+1
-1
1 addition, 1 deletion
gitlab-ci-1.2.yml
includes/tests/static-analysis.yml
+15
-3
15 additions, 3 deletions
includes/tests/static-analysis.yml
with
16 additions
and
4 deletions
gitlab-ci-1.2.yml
+
1
−
1
View file @
f8ceef9b
variables
:
WPDESK_CI_VERSION
:
"
2024.10.
14
"
WPDESK_CI_VERSION
:
"
2024.10.
25
"
MYSQL_ROOT_PASSWORD
:
"
mysql"
MYSQL_DATABASE
:
"
wptest"
MYSQL_USER
:
"
mysql"
...
...
This diff is collapsed.
Click to expand it.
includes/tests/static-analysis.yml
+
15
−
3
View file @
f8ceef9b
...
...
@@ -10,16 +10,22 @@ phpstan:
script
:
-
|
if [ -f "vendor/bin/phpstan" ]; then
vendor/bin/phpstan analyse --
memory-limit=2G
vendor/bin/phpstan analyse --
error-format=gitlab --memory-limit=2G > phpstan-codequality.json
elif [ -f "vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan" ]; then
# PHPStan installed by director
vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan analyse --
memory-limit=2G
vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan analyse --
error-format=gitlab --memory-limit=2G > phpstan-codequality.json
else
echo "PHPStan not found! Install it with 'composer require --dev wpdesk/phpstan-rules'."
# We will be able to handle custom exit after removing rules.allow_failure part
exit 125
fi
allow_failure
:
true
artifacts
:
paths
:
-
phpstan-codequality.json
expire_in
:
1 week
reports
:
codequality
:
phpstan-codequality.json
rules
:
-
!reference
[
.skip-mr
,
rules
]
-
exists
:
...
...
@@ -32,9 +38,15 @@ phpstan:
phpcs
:
extends
:
.static-analysis
script
:
-
vendor/bin/phpcs
-
vendor/bin/phpcs
--report-junit=phpcs-junit.xml --report-full
allow_failure
:
true
rules
:
-
!reference
[
.skip-mr
,
rules
]
-
exists
:
-
phpcs.xml.dist
artifacts
:
paths
:
-
phpcs-junit.xml
expire_in
:
1 week
reports
:
junit
:
phpcs-junit.xml
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