Skip to content

Improve tasks

Improve tasks #33

Workflow file for this run

name: main
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python_version: ["3.10"]
poc_id: ["poc1", "poc2"]
concurrency:
group: ci-tests-${{ matrix.poc_id }}-${{ 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/dev.yaml
channels: conda-forge,nodefaults
activate-environment: poc-celery
auto-update-conda: true
conda-solver: libmamba
- name: Install
run: pip install .
- 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 poc_celery.${{ matrix.poc_id }}.celery_app worker --loglevel=DEBUG &
- name: Run pytest
run: pytest -vvv tests/${{ matrix.poc_id }}
- name: Run linter
run: |
pre-commit install
pre-commit run --all-files