Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Départements-Notaires
Départements-Notaires v2
Commits
f5aaf972
Commit
f5aaf972
authored
Jul 15, 2020
by
Cédric Girardot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI : WIP ajoute les tests unitaires
Change-Id: I6019339769acfbb104ca157fc9af928ef663ef67
parent
d05ba297
Pipeline
#10512
failed with stages
in 3 minutes and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
2 deletions
+34
-2
.gitlab-ci.yml
.gitlab-ci.yml
+34
-2
No files found.
.gitlab-ci.yml
View file @
f5aaf972
...
...
@@ -8,15 +8,15 @@ include:
-
project
:
'
adullact/partage-gitlab-ci'
ref
:
master
file
:
'
/templates/docker/kaniko/.gitlab-ci.template.yml'
-
project
:
'
a
dullact
/partage-gitlab-ci'
-
project
:
'
a
tol-cd
/partage-gitlab-ci'
ref
:
master
file
:
'
/templates/composer/.gitlab-ci.template.yml'
stages
:
-
pre-build
-
pre-build-test
-
build
-
test
-
build
-
package
-
deliver
...
...
@@ -24,9 +24,40 @@ get-version:
stage
:
pre-build
extends
:
.get-version-git-template
test-app
:
stage
:
test
extends
:
.composer-yarn-build-template
services
:
-
mariadb:10.1
variables
:
MYSQL_DATABASE
:
notaires
MYSQL_ROOT_PASSWORD
:
password
ADU_CI_COMPOSER_PROJECT_DIR
:
"
$CI_PROJECT_DIR/appli_sf"
ADU_CI_COMPOSER_CLI_OPTIONS
:
"
--no-progress
--no-suggest
--no-interaction
--no-scripts"
script
:
-
|
VERSION=$(cat "$CI_PROJECT_DIR/$ADU_CI_APP_VERSION_FILE")
cd $ADU_CI_COMPOSER_PROJECT_DIR
cp .env.dist .env
sed -i "s#DATABASE_URL=\"mysqli://notaires:password@127.0.0.1:3306/notaires\"#DATABASE_URL=\"mysqli://root:password@mariadb:3306/notaires\"#" .env
sed -i "s#mysqli://notaires:password@database:3306/notaires#mysqli://root:password@mariadb:3306/notaires#" phpunit.xml.dist
composer install $ADU_CI_COMPOSER_CLI_OPTIONS
yarn install --frozen-lockfile
yarn run build
bin/console doctrine:schema:update --force
bin/console cache:clear
bin/console lint:yaml --no-interaction config
bin/console lint:yaml --no-interaction translations
./vendor/bin/phpcs
./vendor/bin/phplint --no-progress --no-interaction
./vendor/bin/phpstan analyse --no-progress --no-interaction
bin/phpunit tests/FunctionalTests
build-app
:
stage
:
build
extends
:
.composer-yarn-build-template
variables
:
ADU_CI_COMPOSER_PROJECT_DIR
:
"
$CI_PROJECT_DIR/appli_sf"
ARCHIVE_FILES
:
>-
...
...
@@ -52,6 +83,7 @@ build-app:
composer install $ADU_CI_COMPOSER_CLI_OPTIONS
yarn install --frozen-lockfile
yarn run build
mkdir "$CI_PROJECT_DIR/build-result"
tar cvzf "$CI_PROJECT_DIR/build-result/app-$VERSION.tgz" $ARCHIVE_FILES > "$CI_PROJECT_DIR/tar-result.txt"
echo "$(cat "$CI_PROJECT_DIR/tar-result.txt" | wc -l) files added"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment