File tree 2 files changed +34
-1
lines changed
2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 22
22
- name : 🐳 Start all the environment
23
23
run : make start-docker
24
24
25
+ - name : 🦭 Wait for the database to get up
26
+ run : |
27
+ while ! make ping-mysql &>/dev/null; do
28
+ echo "Waiting for database connection..."
29
+ sleep 2
30
+ done
31
+
32
+ - name : 🧪 Wait for the elasticsearch to get up
33
+ run : |
34
+ while ! make ping-elasticsearch &>/dev/null; do
35
+ echo "Waiting for elasticsearch connection..."
36
+ sleep 2
37
+ done
38
+
39
+ - name : 🐰 Wait for the message broker to get up
40
+ run : |
41
+ while ! make ping-rabbitmq &>/dev/null; do
42
+ echo "Waiting for RabbitMQ connection..."
43
+ sleep 2
44
+ done
45
+
25
46
- name : ✅ Run the tests
26
47
run : make test
Original file line number Diff line number Diff line change @@ -110,4 +110,16 @@ start-docker stop-docker destroy-docker: composer-env-file
110
110
rebuild-docker : composer-env-file
111
111
make deps
112
112
make start-docker
113
- docker compose build --pull --force-rm --no-cache
113
+ docker compose build --pull --force-rm --no-cache
114
+
115
+ .PHONY : ping-mysql
116
+ ping-mysql :
117
+ @docker exec librarify-php_ddd_mysql mysqladmin --user=root --password= --host " 127.0.0.1" ping --silent
118
+
119
+ .PHONY : ping-elasticsearch
120
+ ping-elasticsearch :
121
+ @curl -I -XHEAD localhost:9200
122
+
123
+ .PHONY : ping-rabbitmq
124
+ ping-rabbitmq :
125
+ @docker exec librarify-php_ddd-rabbitmq rabbitmqctl ping --silent
You can’t perform that action at this time.
0 commit comments