Skip to content

fix(ci): Update CI workflow to run Celery worker in the background #2

fix(ci): Update CI workflow to run Celery worker in the background

fix(ci): Update CI workflow to run Celery worker in the background #2

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: 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
run: pytest -vvv main/tests/tests_tasks.py