Skip to content

Commit 211fc8f

Browse files
Update django.yml
1 parent 2be616a commit 211fc8f

File tree

1 file changed

+15
-24
lines changed

1 file changed

+15
-24
lines changed

.github/workflows/django.yml

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,57 +10,48 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
strategy:
13-
max-parallel: 4
1413
matrix:
1514
python-version: [3.12]
1615

1716
services:
1817
database:
1918
image: postgres:17.4
20-
container_name: database
21-
restart: always
22-
volumes:
23-
- database:/var/lib/postgresql/data
2419
env:
2520
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
2621
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
2722
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
28-
healthcheck:
29-
test: [ "CMD-SHELL", "pg_isready -U ${{ secrets.POSTGRES_USER }} -d ${{ secrets.POSTGRES_DB }}" ]
30-
interval: 10s
31-
timeout: 5s
32-
retries: 5
3323
ports:
3424
- 5432:5432
25+
options: >-
26+
--health-cmd="pg_isready -U ${{ secrets.POSTGRES_USER }} -d ${{ secrets.POSTGRES_DB }}"
27+
--health-interval=10s
28+
--health-timeout=5s
29+
--health-retries=5
3530
3631
cache:
3732
image: redis:7.4.2
38-
container_name: cache
39-
restart: always
4033
ports:
41-
- "6379:6379"
34+
- 6379:6379
4235

4336
rabbitmq:
4437
image: rabbitmq:3-management
45-
container_name: broker
46-
restart: always
47-
ports:
48-
- "15672:15672"
49-
- "5672:5672"
5038
env:
5139
RABBITMQ_DEFAULT_USER: ${{ secrets.RABBITMQ_USER }}
5240
RABBITMQ_DEFAULT_PASS: ${{ secrets.RABBITMQ_PASSWORD }}
53-
healthcheck:
54-
test: [ "CMD", "rabbitmq-diagnostics", "ping" ]
55-
interval: 10s
56-
timeout: 5s
57-
retries: 3
41+
ports:
42+
- 15672:15672
43+
- 5672:5672
44+
options: >-
45+
--health-cmd="rabbitmq-diagnostics ping"
46+
--health-interval=10s
47+
--health-timeout=5s
48+
--health-retries=3
5849
5950
steps:
6051
- uses: actions/checkout@v4
6152

6253
- name: Set up Python ${{ matrix.python-version }}
63-
uses: actions/setup-python@v3
54+
uses: actions/setup-python@v4
6455
with:
6556
python-version: ${{ matrix.python-version }}
6657

0 commit comments

Comments
 (0)