Skip to content

(chore:translation-worker): add translation worker with argostranslate #201

(chore:translation-worker): add translation worker with argostranslate

(chore:translation-worker): add translation worker with argostranslate #201

Workflow file for this run

name: Tests
on:
push:
branches: [ "main" ]
pull_request:
paths:
- "datashare_python/**.py"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/tests.yml"
jobs:
test-datashare-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python project
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache Docker images
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('docker-compose.yml') }}
- name: Start test services
run: docker compose up -d datashare temporal-post-init elasticsearch
- name: test temporal setup
run: |
curl "https://temporal.download/cli/archive/latest?platform=linux&arch=amd64" --output temporal.tar.gz
tar xzvf temporal.tar.gz
sudo mv temporal /usr/local/bin
temporal operator namespace describe -n datashare-default --address localhost:7233
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.ASTRAL_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
enable-cache: true
working-directory: datashare-python
- name: Run tests
run: |
cd datashare-python
uv sync --frozen --all-extras
uv run --frozen python -m pytest -vvv --cache-clear --show-capture=all -r A
test-worker-template:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python project
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache Docker images
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('docker-compose.yml') }}
- name: Start test services
run: docker compose up -d datashare temporal-post-init elasticsearch
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.ASTRAL_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
enable-cache: true
working-directory: worker-template
- name: Run tests
run: |
cd worker-template
uv sync --frozen --all-extras
uv run --frozen python -m pytest --timeout=180 -vvv --cache-clear --show-capture=all -r A
test-asr-worker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python project
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache Docker images
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('docker-compose.yml') }}
- name: Start test services
run: docker compose up -d datashare temporal-post-init elasticsearch
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.ASTRAL_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
enable-cache: true
working-directory: worker-template
- name: Run tests
run: |
cd asr-worker
uv sync --frozen --all-extras
uv run --frozen python -m pytest --timeout=180 -vvv --cache-clear --show-capture=all -r A
test-translation-worker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python project
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache Docker images
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('docker-compose.yml') }}
- name: Start test services
run: docker compose up -d datashare temporal-post-init elasticsearch
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.ASTRAL_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
enable-cache: true
working-directory: worker-template
- name: Run tests
run: |
cd translation-worker
uv sync --frozen --all-extras
uv run --frozen python -m pytest --timeout=180 -vvv --cache-clear --show-capture=all -r A
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true