Commit 887ac87d authored by François Agneray's avatar François Agneray
Browse files

Merge branch 'sonar' into 'develop'

Sonar

See merge request !39
parents 9edd7c6f 7f3c80f8
Pipeline #1554 passed with stages
in 8 minutes and 5 seconds
......@@ -4,10 +4,13 @@ stages:
- metrics-deploy
- install
- test
- sonar
- build
- deploy
variables:
VERSION: "3.0"
SONARQUBE_URL: https://sonarqube.lam.fr
METRICS_IMAGE: portus.lam.fr/anis/anis-server-metrics
CONTAINER_IMAGE: portus.lam.fr/anis/anis-server
......@@ -58,7 +61,7 @@ install:
image: jakzal/phpqa
stage: install
script:
- composer install
- composer install --ignore-platform-reqs
cache:
paths:
- vendor
......@@ -71,10 +74,24 @@ phpunit:
image: jakzal/phpqa
stage: test
script:
- phpdbg -qrr ./vendor/bin/phpunit --bootstrap ./tests/bootstrap.php --whitelist src --coverage-text --colors=never ./tests
- phpdbg -qrr ./vendor/bin/phpunit --bootstrap ./tests/bootstrap.php --whitelist src --coverage-clover ./coverage/clover.xml --log-junit ./coverage/junit-logfile.xml --colors=never ./tests
cache:
paths:
- vendor
- coverage
policy: pull-push
only:
refs:
- develop
sonar_scanner:
image: portus.lam.fr/ci-tools/sonar-scanner:latest
stage: sonar
script:
- sonar-scanner -Dsonar.projectKey=anis-server -Dsonar.sources=src -Dsonar.projectVersion=$VERSION -Dsonar.host.url=$SONARQUBE_URL -Dsonar.login=$SONAR_TOKEN -Dsonar.php.tests.reportPath=./coverage/junit-logfile.xml -Dsonar.php.coverage.reportPaths=./coverage/clover.xml
cache:
paths:
- coverage
policy: pull
only:
refs:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment