refactor(datashare-python): update artifacts write to match the new artifact spec #393
Workflow file for this run
This file contains hidden or 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: Test translation-worker | |
| on: | |
| push: | |
| branches: [ 'main' ] | |
| pull_request: | |
| paths: | |
| - 'datashare-python/**' | |
| - 'workers/translation-worker/**' | |
| # TODO: leverage some caching here | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: "--version" # skips test by displaying the version | |
| - name: Check formatting | |
| run: ruff format --config qa/ruff.toml --check workers/translation-worker | |
| - name: Lint test | |
| run: ruff check --config qa/ruff.toml workers/translation-worker | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| PYTHON_VERSION: 3.12 | |
| ASTRAL_VERSION: 0.11.6 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Python project | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Cache Docker images | |
| uses: ScribeMD/docker-cache@0.5.0 | |
| 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: workers/translation-worker | |
| - name: Run tests | |
| run: | | |
| cd workers/translation-worker | |
| uv sync --frozen --all-extras --dev | |
| 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 |