@@ -2,40 +2,60 @@ version: 2.1
22
33jobs :
44 build :
5- docker :
6- - image : akeneo/php:7.2
5+ machine :
6+ image : ubuntu-2004:202111-01
77 steps :
8- - checkout
9- - run : composer install
8+ - run :
9+ name : Change rights on project dir
10+ command : sudo chmod -R 777 ../project
11+ - checkout
12+ - run :
13+ name : Build project
14+ command : make dependencies
1015 - persist_to_workspace :
1116 root : ~/
1217 paths :
1318 - project
19+ test_php_unit :
20+ machine :
21+ image : ubuntu-2004:202111-01
22+ steps :
23+ - attach_workspace :
24+ at : ~/
25+ - run :
26+ name : Run PHPUnit tests
27+ command : make unit
1428
15- test_php :
16- docker :
17- - image : akeneo/php:7.2
29+ test_php_spec :
30+ machine :
31+ image : ubuntu-2004:202111-01
1832 steps :
1933 - attach_workspace :
2034 at : ~/
21- - run : bin/phpunit -c phpunit.xml.dist
22- - run : bin/phpspec run
35+ - run :
36+ name : Run PHPSpec tests
37+ command : make spec
2338
2439 test_php_code_style :
25- docker :
26- - image : akeneo/php:7.2
40+ machine :
41+ image : ubuntu-2004:202111-01
2742 steps :
2843 - attach_workspace :
2944 at : ~/
30- - run : bin/php-cs-fixer fix --diff --dry-run --config=.php_cs.php -vvv
45+ - run :
46+ name : Change rights on project dir
47+ command : sudo chmod -R 777 ../project
48+ - run :
49+ name : Launch code style checker
50+ command : make cs
3151
3252 workflow_success :
33- docker :
34- - image : akeneo/php:7.2
53+ machine :
54+ image : ubuntu-2004:202111-01
3555 steps :
36- - run :
37- name : Success
38- command : echo "The build has run with success! Let's merge :)"
56+ - run :
57+ name : Success
58+ command : echo "The build has run with success! Let's merge :)"
3959
4060workflows :
4161 pull_request :
@@ -49,15 +69,19 @@ workflows:
4969 - build :
5070 requires :
5171 - wait_for_user_approval
52- - test_php :
72+ - test_php_unit :
73+ requires :
74+ - build
75+ - test_php_spec :
5376 requires :
5477 - build
5578 - test_php_code_style :
5679 requires :
5780 - build
5881 - workflow_success :
5982 requires :
60- - test_php
83+ - test_php_unit
84+ - test_php_spec
6185 - test_php_code_style
6286
6387 after_merge :
@@ -67,7 +91,10 @@ workflows:
6791 branches :
6892 only :
6993 - master
70- - test_php :
94+ - test_php_unit :
95+ requires :
96+ - build
97+ - test_php_spec :
7198 requires :
7299 - build
73100 - test_php_code_style :
@@ -80,7 +107,13 @@ workflows:
80107 - equal : [ scheduled_pipeline, << pipeline.trigger_source >> ]
81108 - equal : [ "nightly_master", << pipeline.schedule.name >> ]
82109 jobs :
83- - build
84- - test_php :
110+ - build
111+ - test_php_unit :
112+ requires :
113+ - build
114+ - test_php_spec :
85115 requires :
86- - build
116+ - build
117+ - test_php_code_style :
118+ requires :
119+ - build
0 commit comments