[Snyk] Security upgrade python from 3.13.7-slim to 3.14.2-slim #54
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 | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| # Set minimal required permissions | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-python: | |
| name: Python Unit Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.12', '3.13'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - 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-asyncio pytest-cov | |
| # Install OctoLLM dependencies (Phase 1+) | |
| # pip install -r services/orchestrator/requirements.txt | |
| - name: Run pytest with coverage | |
| run: | | |
| echo "Running Python unit tests..." | |
| pytest tests/unit/ -v --cov=services --cov-report=xml --cov-report=term-missing || echo "No tests found yet (Phase 0)" | |
| continue-on-error: true # Don't fail if no tests exist | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| if: matrix.python-version == '3.13' # Only upload once | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| flags: unittests | |
| name: python-unit-tests | |
| fail_ci_if_error: false | |
| test-rust: | |
| name: Rust Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Cache Rust dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| services/reflex-layer/target | |
| services/arms/executor/target | |
| key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-test- | |
| - name: Run cargo test - Reflex Layer | |
| working-directory: services/reflex-layer | |
| run: | | |
| echo "Running Rust unit tests for Reflex Layer..." | |
| cargo test --verbose || echo "No tests found yet (Phase 0)" | |
| continue-on-error: true | |
| - name: Run cargo test - Executor Arm | |
| working-directory: services/arms/executor | |
| run: | | |
| echo "Running Rust unit tests for Executor Arm..." | |
| cargo test --verbose || echo "No tests found yet (Phase 0)" | |
| continue-on-error: true | |
| integration-tests: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:17.7-alpine | |
| env: | |
| POSTGRES_USER: octollm | |
| POSTGRES_PASSWORD: octollm_dev_pass | |
| POSTGRES_DB: octollm | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| redis: | |
| image: redis:8-alpine | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 6379:6379 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| pip install pytest pytest-asyncio httpx asyncpg redis | |
| - name: Wait for services to be ready | |
| run: | | |
| echo "Waiting for PostgreSQL..." | |
| for i in {1..30}; do | |
| pg_isready -h localhost -p 5432 -U octollm && break | |
| echo "Waiting for PostgreSQL to be ready... ($i/30)" | |
| sleep 2 | |
| done | |
| echo "Waiting for Redis..." | |
| for i in {1..30}; do | |
| redis-cli -h localhost -p 6379 ping && break | |
| echo "Waiting for Redis to be ready... ($i/30)" | |
| sleep 2 | |
| done | |
| - name: Run integration tests | |
| env: | |
| DATABASE_URL: postgresql://octollm:octollm_dev_pass@localhost:5432/octollm | |
| REDIS_URL: redis://localhost:6379 | |
| run: | | |
| echo "Running integration tests..." | |
| pytest tests/integration/ -v || echo "No integration tests found yet (Phase 0)" | |
| continue-on-error: true | |
| test-summary: | |
| name: Test Summary | |
| runs-on: ubuntu-latest | |
| needs: [test-python, test-rust, integration-tests] | |
| if: always() | |
| steps: | |
| - name: Check test results | |
| run: | | |
| echo "✅ Test workflow complete" | |
| echo "Phase 0: No tests exist yet - this is expected" | |
| echo "Tests will be added in Phase 1 (Proof of Concept)" |