Skip to content

Keep polling while processing #1336

Keep polling while processing

Keep polling while processing #1336

Workflow file for this run

name: FastAPI backend with SQLite
permissions: {}
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: astral-sh/setup-uv@v5
- name: Install backend
run: uv sync --package acidwatch-api
- name: Run ruff
run: |
uv run --package acidwatch-api ruff format --check src tests packages ../workers
uv run --package acidwatch-api ruff check src tests packages ../workers
- name: Run mypy
run: uv run --package acidwatch-api mypy --strict src packages/acidwatch-models/src packages/acidwatch-messaging/src packages/acidwatch-messaging/typecheck packages/acidwatch-worker-runtime/src
- name: Run pytest
run: |
cp .env.example .env
uv run --package acidwatch-api pytest tests
worker-packages:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- worker: example
test_path: tests
- worker: tocomo
test_path: tests
- worker: arcs
test_path: ""
- worker: arcs-exp
test_path: tests
- worker: srk-vanlaar
test_path: ""
- worker: gibbs-minimization
test_path: tests
- worker: phpitz-reactive
test_path: ""
- worker: phpitz-solubility
test_path: ""
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: astral-sh/setup-uv@v5
- name: Install worker
working-directory: workers/${{ matrix.worker }}
run: uv sync
- name: Build worker package
working-directory: workers/${{ matrix.worker }}
run: uv build
- name: Test worker
if: matrix.test_path != ''
working-directory: workers/${{ matrix.worker }}
run: uv run pytest ${{ matrix.test_path }}