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
a516d492
Commit
a516d492
authored
Jul 22, 2020
by
Cédric Girardot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI : Ajoute tests Cypress
Change-Id: I745931eb999da7220a2553231a47ec644ea50257
parent
b0f8a228
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
32 deletions
+105
-32
.gitlab-ci.yml
.gitlab-ci.yml
+104
-31
appli_sf/src/Entity/Person.php
appli_sf/src/Entity/Person.php
+1
-1
No files found.
.gitlab-ci.yml
View file @
a516d492
include
:
-
project
:
'
adullact/partage-gitlab-ci'
ref
:
master
file
:
'
/templates/get-version/.gitlab-ci.template.yml'
ref
:
master
file
:
'
/templates/get-version/.gitlab-ci.template.yml'
-
project
:
'
adullact/partage-gitlab-ci'
ref
:
master
file
:
'
/templates/test/shellcheck/.gitlab-ci.template.yml'
ref
:
master
file
:
'
/templates/test/shellcheck/.gitlab-ci.template.yml'
-
project
:
'
adullact/partage-gitlab-ci'
ref
:
master
file
:
'
/templates/docker/kaniko/.gitlab-ci.template.yml'
ref
:
master
file
:
'
/templates/docker/kaniko/.gitlab-ci.template.yml'
-
project
:
'
atol-cd/partage-gitlab-ci'
ref
:
master
file
:
'
/templates/composer/.gitlab-ci.template.yml'
ref
:
master
file
:
'
/templates/composer/.gitlab-ci.template.yml'
stages
:
-
pre-build
-
pre-
build-test
-
test
-
build
-
package
-
deliver
-
pre-build
-
build-test
-
quality-
test
-
unit-test
-
e2e-test
-
build
get-version
:
stage
:
pre-build
stage
:
pre-build
extends
:
.get-version-git-template
test
-app
:
stage
:
test
build-
test
:
stage
:
build-
test
extends
:
.composer-yarn-build-template
services
:
-
mariadb:10.1
...
...
@@ -34,6 +34,14 @@ test-app:
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"
artifacts
:
expire_in
:
1 day
paths
:
-
appli_sf/vendor/
-
appli_sf/node_modules/
-
appli_sf/public/
-
appli_sf/.env
-
appli_sf/phpunit.xml.dist
script
:
-
|
VERSION=$(cat "$CI_PROJECT_DIR/$ADU_CI_APP_VERSION_FILE")
...
...
@@ -44,34 +52,99 @@ test-app:
composer install $ADU_CI_COMPOSER_CLI_OPTIONS
yarn install --frozen-lockfile
yarn run build
bin/console doctrine:migration:migrate --no-interaction
bin/console doctrine:schema:drop --force
bin/console doctrine:schema:update --force
bin/console cache:clear
quality-test
:
stage
:
quality-test
extends
:
.composer-yarn-build-template
dependencies
:
-
build-test
services
:
-
mariadb:10.1
variables
:
MYSQL_DATABASE
:
notaires
MYSQL_ROOT_PASSWORD
:
password
ADU_CI_COMPOSER_PROJECT_DIR
:
"
$CI_PROJECT_DIR/appli_sf"
script
:
-
|
cd $ADU_CI_COMPOSER_PROJECT_DIR
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
unit-test
:
stage
:
unit-test
extends
:
.composer-yarn-build-template
dependencies
:
-
build-test
services
:
-
mariadb:10.1
variables
:
MYSQL_DATABASE
:
notaires
MYSQL_ROOT_PASSWORD
:
password
ADU_CI_COMPOSER_PROJECT_DIR
:
"
$CI_PROJECT_DIR/appli_sf"
script
:
-
|
cd $ADU_CI_COMPOSER_PROJECT_DIR
bin/console doctrine:schema:update --force
bin/console cache:clear
bin/phpunit tests/UnitTests
e2e-test
:
stage
:
e2e-test
extends
:
.composer-yarn-build-template
dependencies
:
-
build-test
services
:
-
mariadb:10.1
-
docker:19-dind
variables
:
MYSQL_DATABASE
:
notaires
MYSQL_ROOT_PASSWORD
:
password
ADU_CI_COMPOSER_PROJECT_DIR
:
"
$CI_PROJECT_DIR/appli_sf"
CYPRESS_BASE_URL
:
"
http://localhost:8000"
artifacts
:
expire_in
:
1 day
when
:
always
paths
:
-
e2e/cypress/screenshots
-
e2e/cypress/videos
script
:
-
|
cd $ADU_CI_COMPOSER_PROJECT_DIR
bin/console doctrine:schema:update --force
bin/console cache:clear
bin/console import:individus imports/individus.csv --use-civil-name=1 --no-interaction
bin/console user:add --username=admin --password=P@ssword12345 --email=test@deptnot.test --name=Administrateur --role=ROLE_ADMIN --no-interaction
symfony server:start -d
cd tests/E2E
yarn
cypress run
build-app
:
stage
:
build
stage
:
build
extends
:
.composer-yarn-build-template
variables
:
ADU_CI_COMPOSER_PROJECT_DIR
:
"
$CI_PROJECT_DIR/appli_sf"
ARCHIVE_FILES
:
>-
.env.dist
composer.json
composer.lock
assets/
bin/console
config/
public/
src/
templates/
translations/
vendor/
ARCHIVE_FILES
:
>-
.env.dist
composer.json
composer.lock
assets/
bin/console
config/
public/
src/
templates/
translations/
vendor/
artifacts
:
paths
:
-
"
$CI_PROJECT_DIR/build-result/*"
...
...
appli_sf/src/Entity/Person.php
View file @
a516d492
...
...
@@ -88,7 +88,7 @@ class Person extends AbstractPerson
private
$helpCode
;
/**
* @ORM\Column(name="date_deces", type="date")
* @ORM\Column(name="date_deces", type="date"
, nullable=true
)
*/
private
$deathDate
;
...
...
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