refactor: Improve the intial structure #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
python_version: ["3.10"] | |
concurrency: | |
group: ci-deploy-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniconda-version: "latest" | |
environment-file: conda/base.yaml | |
channels: conda-forge,nodefaults | |
activate-environment: poc-celery | |
auto-update-conda: true | |
conda-solver: libmamba | |
- name: Prepare path | |
run: mkdir -p "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 test_tasks_collectors.py | |
- name: Run pytest for Async tasks | |
run: pytest -vvv test_tasks_async.py |