Skip to content

Update publish.yml

Update publish.yml #1

Workflow file for this run

name: Python 3.8 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.8"
- 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