Revize ea92a5e5
Přidáno uživatelem Jakub Vašta před asi 4 roky(ů)
.gitlab-ci.yml | ||
---|---|---|
2 | 2 |
# IMAGE_NAME: zcu-campus-life-app:$CI_COMMIT_REF_NAME |
3 | 3 |
|
4 | 4 |
stages: |
5 |
- test |
|
6 | 5 |
- linter |
7 | 6 |
- build |
7 |
- test |
|
8 | 8 |
- deploy |
9 |
|
|
10 |
unit_tests: |
|
11 |
stage: test |
|
12 |
tags: |
|
13 |
- test |
|
14 |
script: |
|
15 |
- cd website |
|
16 |
- composer require --dev symfony/phpunit-bridge |
|
17 |
- php bin/phpunit |
|
9 |
|
|
18 | 10 |
php_linter: |
19 | 11 |
stage: linter |
20 | 12 |
tags: |
... | ... | |
23 | 15 |
- cd website |
24 | 16 |
- composer require --dev squizlabs/php_codesniffer |
25 | 17 |
- ./vendor/bin/php-cs-fixer fix --dry-run --config .php_cs --stop-on-violation --using-cache=no |
18 |
|
|
26 | 19 |
build: |
27 | 20 |
stage: build |
28 | 21 |
tags: |
29 | 22 |
- build |
30 | 23 |
script: |
31 | 24 |
# Test whether container can be build or not |
32 |
- docker-compose build |
|
25 |
- ./scripts/build.sh |
|
26 |
- docker-compose stop crawler nginx |
|
33 | 27 |
# We could also push docker image to some registry or docker hub |
28 |
|
|
29 |
tests: |
|
30 |
stage: test |
|
31 |
tags: |
|
32 |
- test |
|
33 |
script: |
|
34 |
- cd website |
|
35 |
- composer require --dev symfony/phpunit-bridge |
|
36 |
- composer require --dev symfony/browser-kit symfony/css-selector |
|
37 |
- docker-compose exec -T php-fpm /bin/sh -c "export APP_ENV=test && cd ../symfony && php bin/phpunit" |
|
38 |
- docker stop $(docker ps -q) |
|
34 | 39 |
|
35 | 40 |
deploy_prod: |
36 | 41 |
stage: deploy |
Také k dispozici: Unified diff
+ Re #8081
+ tests environmnet prepared
+ fast fix in build script