1
- name : Unit and Integration Tests
1
+ name : Full Test
2
2
3
3
on :
4
4
push :
@@ -10,20 +10,30 @@ jobs:
10
10
tests :
11
11
runs-on : ubuntu-latest
12
12
name : " Create Test Coverage Report"
13
+ env :
14
+ NEO4J_CONNECTIONS : ${{ secrets.NEO4J_CONNECTIONS }}
13
15
14
- container :
15
- image : php:8.0-cli
16
- env :
17
- NEO4J_CONNECTIONS : ${{ secrets.NEO4J_CONNECTIONS }}
16
+ steps :
17
+ - uses : actions/checkout@v2
18
+ - uses : php-actions/composer@v6
19
+ with :
20
+ progress : yes
21
+ php_version : 7.4
22
+ version : 2
23
+ - uses : php-actions/phpunit@v3
24
+ with :
25
+ configuration : phpunit.xml.dist
26
+ php_version : 7.4
27
+ php_extensions : bcmath
28
+ memory_limit : 1024M
29
+ bootstrap : vendor/autoload.php
18
30
19
31
services :
20
32
neo4j :
21
33
image : neo4j:4.3
22
- ports :
23
- - 7474:7474
24
- - 7687:7687
25
34
env :
26
35
NEO4J_AUTH : neo4j/test
36
+ NEO4JLABS_PLUGINS : ' ["apoc"]'
27
37
options : >-
28
38
--health-cmd "wget http://localhost:7474 || exit 1"
29
39
--health-interval 30s
32
42
33
43
core1 :
34
44
image : neo4j:4.3-enterprise
35
- ports :
36
- - 7686:7686
37
- - 5000
38
- - 6000
39
- - 7000
40
45
env :
41
46
NEO4J_ACCEPT_LICENSE_AGREEMENT : yes
47
+ NEO4JLABS_PLUGINS : ' ["apoc"]'
42
48
NEO4J_AUTH : neo4j/test
43
49
NEO4J_dbms_mode : CORE
44
50
NEO4J_causalClustering_discoveryAdvertisedAddress : core1:5000
@@ -49,18 +55,11 @@ jobs:
49
55
NEO4J_dbms_connectors_default__advertised__address : core1
50
56
options : >-
51
57
--health-cmd "wget http://localhost:7474 || exit 1"
52
- --health-interval 30s
53
- --health-timeout 10s
54
- --health-retries 5
55
58
core2 :
56
59
image : neo4j:4.3-enterprise
57
- ports :
58
- - 7686
59
- - 5000
60
- - 6000
61
- - 7000
62
60
env :
63
61
NEO4J_ACCEPT_LICENSE_AGREEMENT : yes
62
+ NEO4JLABS_PLUGINS : ' ["apoc"]'
64
63
NEO4J_AUTH : neo4j/test
65
64
NEO4J_dbms_mode : CORE
66
65
NEO4J_causalClustering_discoveryAdvertisedAddress : core2:5000
71
70
72
71
core3 :
73
72
image : neo4j:4.3-enterprise
74
- ports :
75
- - 7686
76
- - 5000
77
- - 6000
78
- - 7000
79
73
env :
80
74
NEO4J_ACCEPT_LICENSE_AGREEMENT : yes
75
+ NEO4JLABS_PLUGINS : ' ["apoc"]'
81
76
NEO4J_AUTH : neo4j/test
82
77
NEO4J_dbms_mode : CORE
83
78
NEO4J_causalClustering_discoveryAdvertisedAddress : core3:5000
@@ -87,19 +82,12 @@ jobs:
87
82
NEO4J_dbms_connectors_default__advertised__address : core3
88
83
options : >-
89
84
--health-cmd "wget http://localhost:7474 || exit 1"
90
- --health-interval 30s
91
- --health-timeout 10s
92
- --health-retries 5
93
85
94
86
readreplica1 :
95
87
image : neo4j:4.3-enterprise
96
- ports :
97
- - 7686
98
- - 5000
99
- - 6000
100
- - 7000
101
88
env :
102
89
NEO4J_ACCEPT_LICENSE_AGREEMENT : yes
90
+ NEO4JLABS_PLUGINS : ' ["apoc"]'
103
91
NEO4J_AUTH : neo4j/test
104
92
NEO4J_dbms_mode : READ_REPLICA
105
93
NEO4J_causalClustering_discoveryAdvertisedAddress : readreplica1:5000
@@ -109,37 +97,4 @@ jobs:
109
97
NEO4J_dbms_connectors_default__advertised__address : readreplica1
110
98
options : >-
111
99
--health-cmd "wget http://localhost:7474 || exit 1"
112
- --health-interval 30s
113
- --health-timeout 10s
114
- --health-retries 5
115
100
116
- steps :
117
- - uses : actions/checkout@v1
118
- - name : Setup PHP
119
- run : |
120
- apt-get update && apt-get install -y \
121
- libzip-dev \
122
- unzip \
123
- wget \
124
- git \
125
- && docker-php-ext-install -j$(nproc) bcmath \
126
- && pecl install xdebug \
127
- && docker-php-ext-enable xdebug
128
- - name : Install Composer
129
- run : curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
130
- - name : Install dependencies
131
- run : /usr/local/bin/composer install
132
- - name : Install Code Climate Test Reporter
133
- run : |
134
- wget https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 \
135
- && mv test-reporter-latest-linux-amd64 /usr/bin/cc-test-reporter \
136
- && chmod +x /usr/bin/cc-test-reporter
137
- - name : Run PHPUnit Coverage
138
- run : |
139
- cc-test-reporter before-build \
140
- && XDEBUG_MODE=coverage vendor/bin/phpunit --config phpunit.coverage.xml.dist -d memory_limit=1024M \
141
- && mkdir -p out/phpunit \
142
- && cp out/phpunit/clover.xml clover.xml
143
- - name : Run Code Climate Test Reporter
144
- run : |
145
- cc-test-reporter after-build --id ec331dd009edca126a4c27f4921c129de840c8a117643348e3b75ec547661f28 --exit-code 0
0 commit comments