diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2403aa67..bd2535fa5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,6 +53,10 @@ jobs: needs: changes if: ${{ needs.changes.outputs.code == 'true' || github.event_name == 'push' }} uses: ./.github/workflows/rust.yml + secrets: + OLLAMA_BASE_URL: ${{ secrets.OLLAMA_BASE_URL }} + OLLAMA_MODEL: ${{ secrets.OLLAMA_MODEL }} + OLLAMA_EMBEDDING_MODEL: ${{ secrets.OLLAMA_EMBEDDING_MODEL }} release-pr: name: Release PR diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7c9ae9064..6ee625eca 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,6 +2,13 @@ name: Rust on: workflow_call: + secrets: + OLLAMA_BASE_URL: + required: false + OLLAMA_MODEL: + required: false + OLLAMA_EMBEDDING_MODEL: + required: false concurrency: group: rust-${{ github.event.pull_request.number || github.sha }} @@ -81,6 +88,38 @@ jobs: - name: Run tests run: cargo nextest run --workspace + integration: + name: Integration (Ollama) + runs-on: arc-runner-set + if: github.ref == 'refs/heads/main' + steps: + - name: Checkout code + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + with: + persist-credentials: false + + - name: Start sccache + run: sccache --start-server || true + + - name: Verify Ollama connectivity + run: curl -sf "${OLLAMA_BASE_URL}/api/tags" | head -c 200 + env: + OLLAMA_BASE_URL: ${{ secrets.OLLAMA_BASE_URL }} + + - name: Prepare CI config + run: envsubst < config.ci.yaml > config.yaml + env: + OLLAMA_BASE_URL: ${{ secrets.OLLAMA_BASE_URL }} + OLLAMA_MODEL: ${{ secrets.OLLAMA_MODEL }} + OLLAMA_EMBEDDING_MODEL: ${{ secrets.OLLAMA_EMBEDDING_MODEL }} + + - name: Run integration tests + run: cargo nextest run --workspace --all-features --run-ignored ignored-only + env: + RARA_REAL_TAPE_SOAK_SECS: "120" + RARA_REAL_TAPE_TURN_TIMEOUT_SECS: "300" + timeout-minutes: 15 + rust-success: name: Rust Success runs-on: arc-runner-set diff --git a/config.ci.yaml b/config.ci.yaml new file mode 100644 index 000000000..5a6744102 --- /dev/null +++ b/config.ci.yaml @@ -0,0 +1,34 @@ +database: + max_connections: 5 +http: + bind_address: 127.0.0.1:0 + max_body_size: 100MiB + enable_cors: false + request_timeout: 60 +grpc: + bind_address: 127.0.0.1:0 + server_address: 127.0.0.1:0 + max_recv_message_size: 512MiB + max_send_message_size: 512MiB +telemetry: + otlp_endpoint: null + otlp_protocol: null +llm: + default_provider: ollama + providers: + ollama: + base_url: ${OLLAMA_BASE_URL}/v1 + api_key: ollama + default_model: ${OLLAMA_MODEL} +knowledge: + embedding_model: ${OLLAMA_EMBEDDING_MODEL} + embedding_dimensions: 768 + search_top_k: 10 + similarity_threshold: 0.85 + extractor_model: ${OLLAMA_MODEL} +mita: + heartbeat_interval: "30m" +users: +- name: ryan + role: root + platforms: []