add support for qwen3.5 vl model #207
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: PR Tests | |
| on: | |
| pull_request: | |
| branches: [ main, master, develop ] | |
| jobs: | |
| test-py312: | |
| name: Python 3.12 Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Install dependencies with uv | |
| run: | | |
| uv venv | |
| source .venv/bin/activate | |
| uv pip install -e ".[dev]" | |
| - name: Display Python and package information | |
| run: | | |
| source .venv/bin/activate | |
| python --version | |
| tox --version | |
| which python | |
| - name: Run Python 3.12 non-GPU tests | |
| run: | | |
| source .venv/bin/activate | |
| tox -e py312-nogpu-cov | |
| test-py311: | |
| name: Python 3.11 Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Install dependencies with uv | |
| run: | | |
| uv venv | |
| source .venv/bin/activate | |
| uv pip install -e ".[dev]" | |
| - name: Display Python and package information | |
| run: | | |
| source .venv/bin/activate | |
| python --version | |
| tox --version | |
| which python | |
| - name: Run Python 3.11 non-GPU tests | |
| run: | | |
| source .venv/bin/activate | |
| # we will still be able to print out the coverage in this run, it just | |
| # won't be able to upload it to codecov | |
| tox -e py311-nogpu-cov | |
| test-coverage: | |
| name: Test with Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Install dependencies with uv | |
| run: | | |
| uv venv | |
| source .venv/bin/activate | |
| uv pip install -e ".[dev]" | |
| - name: Display Python and package information | |
| run: | | |
| source .venv/bin/activate | |
| python --version | |
| tox --version | |
| which python | |
| - name: Run tests with coverage | |
| run: | | |
| source .venv/bin/activate | |
| tox -e py312-nogpu-cov | |
| - name: Upload coverage results to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: Red-Hat-AI-Innovation-Team/mini_trainer | |
| fail_ci_if_error: true | |
| verbose: true | |
| format-check: | |
| name: Format Check (Non-blocking) | |
| runs-on: ubuntu-latest | |
| continue-on-error: true # This makes the job non-required | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch full history to compare with base branch | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Install dependencies with uv | |
| run: | | |
| uv venv | |
| source .venv/bin/activate | |
| uv pip install -e ".[dev]" | |
| - name: Check code formatting on changed files | |
| run: | | |
| source .venv/bin/activate | |
| # Get the base branch (target branch of the PR) | |
| BASE_BRANCH="${{ github.base_ref }}" | |
| echo "Comparing against base branch: origin/$BASE_BRANCH" | |
| # Get list of changed Python files | |
| CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRT origin/$BASE_BRANCH...HEAD | grep '\.py$' || true) | |
| if [ -z "$CHANGED_FILES" ]; then | |
| echo "No Python files changed in this PR" | |
| exit 0 | |
| fi | |
| echo "Changed Python files:" | |
| echo "$CHANGED_FILES" | |
| # Run ruff format check on changed files only | |
| echo "$CHANGED_FILES" | xargs ruff format --check | |
| lint: | |
| name: Linting (Non-blocking) | |
| runs-on: ubuntu-latest | |
| continue-on-error: true # This makes the job non-required | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch full history to compare with base branch | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Install dependencies with uv | |
| run: | | |
| uv venv | |
| source .venv/bin/activate | |
| uv pip install -e ".[dev]" | |
| - name: Run linting checks on changed files | |
| run: | | |
| source .venv/bin/activate | |
| # Get the base branch (target branch of the PR) | |
| BASE_BRANCH="${{ github.base_ref }}" | |
| echo "Comparing against base branch: origin/$BASE_BRANCH" | |
| # Get list of changed Python files | |
| CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRT origin/$BASE_BRANCH...HEAD | grep '\.py$' || true) | |
| if [ -z "$CHANGED_FILES" ]; then | |
| echo "No Python files changed in this PR" | |
| exit 0 | |
| fi | |
| echo "Changed Python files:" | |
| echo "$CHANGED_FILES" | |
| # Run ruff on changed files only | |
| echo "$CHANGED_FILES" | xargs ruff check | |
| # Summary job to ensure required tests pass | |
| tests-passed: | |
| name: All Required Tests Passed | |
| needs: [test-py312, test-py311, test-coverage] | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - name: Check test results | |
| run: | | |
| if [[ "${{ needs.test-py312.result }}" != "success" || \ | |
| "${{ needs.test-py311.result }}" != "success" || \ | |
| "${{ needs.test-coverage.result }}" != "success" ]]; then | |
| echo "One or more required tests failed!" | |
| echo "Python 3.12 tests: ${{ needs.test-py312.result }}" | |
| echo "Python 3.11 tests: ${{ needs.test-py311.result }}" | |
| echo "Coverage tests: ${{ needs.test-coverage.result }}" | |
| exit 1 | |
| else | |
| echo "All required tests passed successfully!" | |
| echo "Format check: ${{ needs.format-check.result }} (non-blocking)" | |
| echo "Linting: ${{ needs.lint.result }} (non-blocking)" | |
| fi |