chore: fix docker build #1
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: Tests | |
on: | |
push: | |
branches: [ 'main' ] | |
pull_request: | |
paths: | |
- 'ml_worker/**.py' | |
- 'pyproject.toml' | |
- 'uv.lock' | |
- '.github/workflows/tests.yml' | |
jobs: | |
test-worker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: psf/black@stable | |
with: | |
options: "--check --verbose" | |
jupyter: true | |
src: "." | |
version: "~= 24.2.0" | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
version: "0.5.5" | |
python-version: "3.11" | |
enable-cache: true | |
- name: Setup Python project | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Run tests | |
run: uv run --frozen pytest -vvv --cache-clear --show-capture=all -r A . | |
services: | |
elasticsearch: | |
image: elasticsearch:7.17.25 | |
env: | |
discovery.type: single-node | |
options: >- | |
--health-cmd "curl http://localhost:9200" | |
--health-interval 3s | |
--health-timeout 1s | |
--health-retries 10 | |
--health-start-period 5s | |
ports: | |
- "9200:9200" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true |