111 lines
3.3 KiB
YAML
111 lines
3.3 KiB
YAML
name: Windows Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master, dev]
|
|
pull_request:
|
|
branches: [main, master, dev]
|
|
|
|
jobs:
|
|
windows-unit:
|
|
name: Windows / Unit / ${{ matrix.python-version }}
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12"]
|
|
fail-fast: false
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: 'pip'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pytest pytest-cov pytest-mock pytest-asyncio
|
|
pip install -r .github/requirements-ci.txt
|
|
pip install -r requirements-dev.txt
|
|
|
|
- name: Run smoke test (import check)
|
|
run: |
|
|
python -c "import sys; sys.path.insert(0, '.'); print('Testing module import...'); exec(open('tests/smoke_test.py').read())"
|
|
env:
|
|
PYTHONPATH: ${{ github.workspace }}
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
pytest tests/unit/ -v --cov=nodes --cov-report=xml --cov-report=term-missing
|
|
env:
|
|
PYTHONPATH: ${{ github.workspace }}
|
|
|
|
- name: Upload coverage reports
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
file: ./coverage.xml
|
|
flags: windows-unit-tests
|
|
name: codecov-windows-unit-py${{ matrix.python-version }}
|
|
fail_ci_if_error: false
|
|
|
|
- name: Test summary
|
|
if: always()
|
|
run: |
|
|
echo "## Windows Unit Test Results (Python ${{ matrix.python-version }})" >> $env:GITHUB_STEP_SUMMARY
|
|
echo "[OK] Windows unit tests completed" >> $env:GITHUB_STEP_SUMMARY
|
|
|
|
windows-integration:
|
|
name: Windows / Integration / ${{ matrix.python-version }}
|
|
runs-on: windows-latest
|
|
needs: windows-unit
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12"]
|
|
fail-fast: false
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: 'pip'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pytest pytest-cov pytest-mock pytest-asyncio
|
|
pip install -r .github/requirements-ci.txt
|
|
pip install -r requirements-dev.txt
|
|
|
|
- name: Create model cache directory
|
|
run: |
|
|
New-Item -Path "$env:USERPROFILE\.cache\huggingface" -ItemType Directory -Force
|
|
|
|
- name: Cache models
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~\.cache\huggingface
|
|
key: ${{ runner.os }}-huggingface-models-${{ hashFiles('tests/integration_real/*.py') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-huggingface-models-
|
|
|
|
- name: Run real model integration tests
|
|
run: |
|
|
pytest tests/integration_real/ -v -m real_model --tb=short
|
|
env:
|
|
PYTHONPATH: ${{ github.workspace }}
|
|
HF_HUB_DISABLE_TELEMETRY: 1
|
|
|
|
- name: Test summary
|
|
if: always()
|
|
run: |
|
|
echo "## Windows Integration Test Results (Python ${{ matrix.python-version }})" >> $env:GITHUB_STEP_SUMMARY
|
|
echo "[OK] Windows integration tests completed" >> $env:GITHUB_STEP_SUMMARY
|