Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Jérémy Munsch
7917b8acf4
Add config for php 8.3 CI 2024-02-21 11:35:53 +01:00
Jérémy Munsch
fd31a5b152
Add editor config file 2024-02-21 11:35:27 +01:00
9 changed files with 145 additions and 0 deletions

12
.editorconfig Normal file
View file

@ -0,0 +1,12 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{yml,yaml}]
indent_size = 2

10
build/build8.3.yml Normal file
View file

@ -0,0 +1,10 @@
include:
- project: "ldc-web/shared-ci"
ref: "main"
file: "build/composer8.3.yml"
- project: "ldc-web/shared-ci"
ref: "main"
file: "build/npm.yml"
- project: "ldc-web/shared-ci"
ref: "main"
file: "build/docker.yml"

View file

@ -0,0 +1,28 @@
composer-build:
stage: build
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.3:latest
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
- composer config http-basic.connect.advancedcustomfields.com $APP_ACF_USER $APP_ACF_PWD
cache:
paths:
- vendor/
- public/
script:
- composer install --no-dev --optimize-autoloader --classmap-authoritative
artifacts:
expose_as: "composer-build"
paths:
- vendor
- public
allow_failure: false
dependencies:
- composer-security
needs:
- job: composer-security
optional: true
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_TAG != null

24
build/composer8.3.yml Normal file
View file

@ -0,0 +1,24 @@
composer-build:
stage: build
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.3:latest
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
cache:
paths:
- vendor/
script:
- composer install --no-dev --optimize-autoloader --classmap-authoritative --no-scripts
artifacts:
expose_as: "vendor"
paths:
- vendor
allow_failure: false
dependencies:
- composer-security
needs:
- job: composer-security
optional: true
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_TAG != null

13
lint/lint8.3.yml Normal file
View file

@ -0,0 +1,13 @@
include:
- project: "ldc-web/shared-ci"
ref: "main"
file: "lint/phpcs8.3.yml"
- project: "ldc-web/shared-ci"
ref: "main"
file: "lint/phpstan8.3.yml"
- project: "ldc-web/shared-ci"
ref: "main"
file: "lint/eslint.yml"
- project: "ldc-web/shared-ci"
ref: "main"
file: "lint/stylelint.yml"

18
lint/phpcs8.3.yml Normal file
View file

@ -0,0 +1,18 @@
phpcs:
stage: lint
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.3:latest
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
- composer install --no-scripts
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
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"

18
lint/phpstan8.3.yml Normal file
View file

@ -0,0 +1,18 @@
phpstan:
stage: lint
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.3:latest
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
- composer install --no-scripts
script:
- vendor/bin/phpstan --error-format=junit > phpstan-report.xml
artifacts:
when: on_failure
expose_as: "phpstan"
paths:
- phpstan-report.xml
reports:
junit: phpstan-report.xml
allow_failure: true
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"

15
security/composer8.3.yml Normal file
View file

@ -0,0 +1,15 @@
composer-security:
stage: security
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa:php8.3-latest
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
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_TAG != null

7
security/security8.3.yml Normal file
View file

@ -0,0 +1,7 @@
include:
- project: "ldc-web/shared-ci"
ref: "main"
file: "security/composer8.3.yml"
- project: "ldc-web/shared-ci"
ref: "main"
file: "security/npm.yml"