Skip to content

feat: Concurrent executions with indexedDB Main Finalization (#1328) #2

feat: Concurrent executions with indexedDB Main Finalization (#1328)

feat: Concurrent executions with indexedDB Main Finalization (#1328) #2

Workflow file for this run

name: CLI for DTaaS
on:
push:
paths:
- 'cli/**'
pull_request:
paths:
- 'cli/**'
workflow_dispatch:
jobs:
test-cli:
name: Test DTaaS CLI
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: cli
steps:
# ───── 1. Checkout ─────
- uses: actions/checkout@v4
# ───── 2. Python + Poetry ─────
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Poetry
env:
POETRY_HOME: ${{ runner.temp }}/poetry
run: |
python -m pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python -
- name: Add Poetry to PATH (Linux/macOS)
if: runner.os != 'Windows'
run: echo "${{ runner.temp }}/poetry/bin" >> $GITHUB_PATH
- name: Add Poetry to PATH (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: echo "${{ runner.temp }}\poetry\bin" |
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
# ───── 3. Install deps once ─────
- name: Install dev dependencies
run: poetry install --with dev
# ───── 4. Lint ─────
- name: Run pylint (min score 9.0)
run: poetry run pylint src --rcfile=../.pylintrc --fail-under=9
# ───── 5. Tests ─────
- name: Run pytest (with coverage)
if: matrix.os == 'ubuntu-latest'
run: |
poetry run pytest --cov=src --cov-report=xml \
--cov-report=term-missing
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v5
with:
files: cli/coverage.xml
flags: cli-tests
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
# Windows/macOS → test without coverage
- name: Run pytest (no coverage)
if: matrix.os != 'ubuntu-latest'
run: poetry run pytest --no-cov -q
# ───── 6. Build + dist artefacts ─────
- name: Install runtime dependencies
run: poetry install --only main
- name: Build wheel and sdist
run: |
poetry build --format wheel
poetry build --format sdist
- name: Upload dist artefacts
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: dtaas-cli
path: |
cli/dist/*.whl
cli/dist/*.tar.gz
retention-days: 1