forked from TonnoBelloSnello/microrabbit
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.43 KB
/
test-3_10.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Python 3.10 test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
services:
rabbitmq:
image: rabbitmq:3.13.7
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- 5672:5672
options: >-
--health-cmd "rabbitmqctl node_health_check"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Git checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install . pytest pytest_asyncio
- name: Wait for RabbitMQ to be ready
run: |
for i in {1..60}; do
if nc -z localhost 5672; then
echo "RabbitMQ is up and running!"
break
fi
echo "Waiting for RabbitMQ... (Attempt $i/60)"
sleep 2
done
- name: Run tests
run: |
pytest -s