@@ -10,7 +10,7 @@ executors:
10
10
docker_layer_caching : true
11
11
12
12
jobs :
13
- magento-build-and-test :
13
+ magento-build-and-test-job :
14
14
executor :
15
15
name : magento-executor
16
16
parameters :
32
32
name : Setup folder structure and override file
33
33
command : |
34
34
mkdir ~/Sites
35
+ mkdir ~/Sites/unit-tests
36
+ mkdir ~/Sites/unit-coverage
35
37
cd ~/Sites
36
38
cat \<<EOF > compose.override.yml
37
39
services:
@@ -63,27 +65,27 @@ jobs:
63
65
bin/magento setup:di:compile
64
66
bin/magento module:status Algolia_AlgoliaSearch
65
67
- run :
66
- name : Run Unit Tests and Unit Coverage
68
+ name : Run Unit Tests and copy results to CircleCI
67
69
working_directory : ~/Sites
68
70
command : |
69
- bin/test/unit vendor/algolia/algoliasearch-magento-2/Test/Unit
70
- bin/test/unit-coverage vendor/algolia/algoliasearch-magento-2/Test/Unit
71
+ bin/cli vendor/bin/phpunit --log-junit /var/www/html/dev/tests/unit/report/junit.xml /var/www/html/vendor/algolia/algoliasearch-magento-2/Test/Unit
72
+ docker cp $(docker compose ps -q phpfpm):/var/www/html/dev/tests/unit/report/junit.xml ./unit-tests/
73
+ - store_test_results :
74
+ path : ~/Sites/unit-tests
71
75
- run :
72
- name : Copy test results to CircleCI
76
+ name : Run Unit Coverage
73
77
working_directory : ~/Sites
74
78
command : |
75
- bin/copyfromcontainer dev/tests/unit/report
79
+ bin/test/unit-coverage vendor/algolia/algoliasearch-magento-2/Test/Unit
80
+ docker cp $(docker compose ps -q phpfpm):/var/www/html/dev/tests/unit/report ~/Sites/unit-coverage/
76
81
- store_artifacts :
77
- path : ~/Sites/dev/tests/unit/report
78
- destination : test-results
79
- - store_test_results :
80
- path : ~/Sites/dev/tests/unit/report
81
-
82
+ path : ~/Sites/unit-tests
83
+ destination : test-results/magento-<< parameters.magento-version >>-php-<< parameters.php-version >>
82
84
83
85
workflows :
84
- magento-build-and-test-workflow :
86
+ magento-build-and-test :
85
87
jobs :
86
- - magento-build-and-test :
88
+ - magento-build-and-test-job :
87
89
matrix :
88
90
parameters :
89
91
php-version : ["8.2"]
0 commit comments