Skip to content
Snippets Groups Projects
Commit 3497d759 authored by llaffont's avatar llaffont
Browse files

Gitlab CI integration: add default database

parent ca3ae3ba
Branches
Tags
No related merge requests found
#!/bin/sh
COVERAGE_DIR="coverage/$(basename "$PWD")/${CI_BUILD_REF_NAME}/${CI_BUILD_ID}"
source ./update.sh
cp config.ini.default config.ini
cp index.php.default index.php
sed -i s/sgbd.config.username =/sgbd.config.username = opac/g config.ini
sed -i s/sgbd.config.password =/sgbd.config.password = opac/g config.ini
sed -i s/sgbd.config.dbname =/sgbd.config.dbname = opac/g config.ini
touch local.php
phpunit -c tests/phpunit.xml --coverage-text=coverage.txt --coverage-html="../${COVERAGE_DIR}"
echo "</pre>"
echo "<a href='/${COVERAGE_DIR}'>Code coverage</a>"
echo "<pre>"
echo "coverage report at /${COVERAGE_DIR}"
cat coverage.txt
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