Skip to content

refactor: Implement Celery Tasks with Redis and RabbitMQ Integration" #9

refactor: Implement Celery Tasks with Redis and RabbitMQ Integration"

refactor: Implement Celery Tasks with Redis and RabbitMQ Integration" #9

Workflow file for this run

name: main
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
python_version: ["3.10"]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
mamba-version: "*"
environment-file: conda/base.yaml
channels: conda-forge,nodefaults
activate-environment: celery-collectors
use-mamba: true
miniforge-variant: Mambaforge
- name: Prepare path
run: mkdir "data/"
- name: Run Rabbitmq container
run: docker run --name rabbitmq -d --rm -p 5672:5672 rabbitmq
- name: Run Redis container
run: docker run --name redis -d redis redis-server --save 60 1 --loglevel warning
- name: Start Celery worker
run: celery -A main.celery_app worker --loglevel=DEBUG &
- name: Run pytest for Collectors
run: pytest -vvv main/tests/tests_tasks_collectors.py
- name: Run pytest for Async tasks
run: pytest -vvv main/tests/tests_tasks_async.py