Skip to content
Snippets Groups Projects
Verified Commit 730c095e authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

feat: add PHP linter to testing code


Verify, PHP files are free from syntax errors before deploy. Later it
may be good idea to separate this into own stage where code is analyzed
with phpstan and phpcs.

Signed-off-by: default avatarBart Jaskulski <bjaskulski@protonmail.com>
parent 36696da4
Branches
Tags
No related merge requests found
variables:
WPDESK_CI_VERSION: "1.2"
WPDESK_CI_VERSION: "2023.02.1"
MYSQL_ROOT_PASSWORD: "mysql"
MYSQL_DATABASE: "wptest"
MYSQL_USER: "mysql"
......@@ -27,6 +27,9 @@ include:
- project: 'wpdesk/gitlab-ci'
ref: 'master'
file: '/includes/prepare.yml'
- project: 'wpdesk/gitlab-ci'
ref: 'master'
file: '/includes/tests/lint.yml'
- project: 'wpdesk/gitlab-ci'
ref: 'master'
file: '/includes/tests/unit.yml'
......
.lint: &lint-tmpl
stage: tests
script: find -name '*.php' -not -path '*vendor*' -print0 | xargs -n1 -0 -P16 php -l >/dev/null
lint:8.1:
<<: *lint-tmpl
image: gitlab.wpdesk.dev:5050/wpdesk/docker-tests/php-box:8.1
lint:7.2:
<<: *lint-tmpl
image: gitlab.wpdesk.dev:5050/wpdesk/docker-tests/php-box:7.2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment