Skip to content

refactor: Full refactor of the Decompose CLI Tool & introduction of p… #115

refactor: Full refactor of the Decompose CLI Tool & introduction of p…

refactor: Full refactor of the Decompose CLI Tool & introduction of p… #115

Workflow file for this run

name: Verify Code Quality
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.ref_name }}
cancel-in-progress: true
jobs:
quality:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12'] # Need to add 3.13 once we resolve outlines issues.
env:
CICD: 1
OLLAMA_HOST: "127.0.0.1:5000"
steps:
- uses: actions/checkout@v4
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: pre-commit cache key
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> "$GITHUB_ENV"
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install dependencies
run: uv sync --frozen --all-extras --group dev
- name: Check style and run tests
run: pre-commit run --all-files
- name: Send failure message pre-commit
if: failure() # This step will only run if a previous step failed
run: echo "The quality verification failed. Please run precommit "
- name: Install Ollama
run: curl -fsSL https://ollama.com/install.sh | sh
- name: Start serving ollama
run: nohup ollama serve &
- name: Pull Llama 3.2:1b model
run: ollama pull llama3.2:1b
- name: Run Tests
run: uv run -m pytest -v test
- name: Send failure message tests
if: failure() # This step will only run if a previous step failed
run: echo "Tests failed. Please verify that tests are working locally."