mirror of
https://gitea.ingwaz.work/Ingwaz/openbrain-mcp.git
synced 2026-06-15 22:07:08 +00:00
ci: add unit tests and e2e_truth to CI pipeline
- Run cargo test --lib in CI checks to execute PLN/ECAN/scorer unit tests - Add e2e_truth test suite to VPS e2e test step - Enable OPENBRAIN__TRUTH__ENABLED for e2e testing
This commit is contained in:
@@ -60,6 +60,7 @@ jobs:
|
|||||||
. "$HOME/.cargo/env"
|
. "$HOME/.cargo/env"
|
||||||
cargo check
|
cargo check
|
||||||
cargo test --no-run
|
cargo test --no-run
|
||||||
|
cargo test --lib
|
||||||
|
|
||||||
- name: Build release
|
- name: Build release
|
||||||
run: |
|
run: |
|
||||||
@@ -239,11 +240,13 @@ jobs:
|
|||||||
OPENBRAIN_E2E_REMOTE: "true"
|
OPENBRAIN_E2E_REMOTE: "true"
|
||||||
OPENBRAIN_E2E_BASE_URL: http://${{ secrets.VPS_HOST }}:3100
|
OPENBRAIN_E2E_BASE_URL: http://${{ secrets.VPS_HOST }}:3100
|
||||||
OPENBRAIN__AUTH__ENABLED: "true"
|
OPENBRAIN__AUTH__ENABLED: "true"
|
||||||
|
OPENBRAIN__TRUTH__ENABLED: "true"
|
||||||
run: |
|
run: |
|
||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
export OPENBRAIN_E2E_API_KEY="$(cat .ci/openbrain_e2e_key)"
|
export OPENBRAIN_E2E_API_KEY="$(cat .ci/openbrain_e2e_key)"
|
||||||
. "$HOME/.cargo/env"
|
. "$HOME/.cargo/env"
|
||||||
cargo test --test e2e_mcp -- --test-threads=1
|
cargo test --test e2e_mcp -- --test-threads=1
|
||||||
|
cargo test --test e2e_truth -- --test-threads=1
|
||||||
|
|
||||||
- name: Remove ephemeral e2e key and restart service
|
- name: Remove ephemeral e2e key and restart service
|
||||||
if: always() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
|
if: always() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
|
||||||
|
|||||||
Reference in New Issue
Block a user