From 18396cd7bec76964b261ebd82b72c7b731d79dce Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Thu, 8 Sep 2022 11:18:37 +0200 Subject: [PATCH] add CI, update phpcs.xml from base, update vscode conf --- .gitlab-ci.yml | 46 +++++++++++++ .vscode/settings.json | 3 +- phpcs.xml | 147 +++++++++++++++++++++--------------------- 3 files changed, 121 insertions(+), 75 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..cb2dd3ff --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,46 @@ +image: $CI_REGISTRY/service-web-lab/ldc-web-images-docker/ldcweb-qa:php7.3-1.0 + +stages: + - Security + - CodingStandards + +composer-security: + stage: Security + script: + - local-php-security-checker --format=json --path=./composer.lock > composer-security-checker-report.json + artifacts: + when: on_failure + expose_as: 'composer-security-checker' + paths: + - composer-security-checker-report.json + allow_failure: true + +npm-security: + stage: Security + script: + - audit-ci -p npm -o json > npm-security-checker-report.json + artifacts: + when: on_failure + expose_as: 'npm-security-checker' + paths: + - npm-security-checker-report.json + allow_failure: true + +phpcs: + stage: CodingStandards + before_script: + - composer config gitlab-token.gitlab.com $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD + - composer install + cache: + paths: + - vendor/ + script: + - vendor/bin/phpcs --report=junit --report-file=phpcs-report.xml + artifacts: + when: on_failure + expose_as: 'phpcs' + paths: + - phpcs-report.xml + reports: + junit: phpcs-report.xml + allow_failure: false \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 8ff9020a..093b7af3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,7 +16,8 @@ "titleBar.activeBackground": "#630856", "titleBar.activeForeground": "#e7e7e7", "titleBar.inactiveBackground": "#63085699", - "titleBar.inactiveForeground": "#e7e7e799" + "titleBar.inactiveForeground": "#e7e7e799", + "commandCenter.border": "#e7e7e799" }, "peacock.remoteColor": "#630856" } diff --git a/phpcs.xml b/phpcs.xml index 963cf6a4..9127c939 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,103 +1,102 @@ - + Created with the PHP Coding Standard Generator. http://edorian.github.com/php-coding-standard-generator/ app/ config/ database/factories - database/seeders routes/ - tests/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - - - - - - + + + + + + + + + + + - + - + - + - - + + @@ -105,20 +104,20 @@ - - + + - + - - + +