ops(ci): configure LLM API keys in Forgejo CI for integration test execution
CI / lint (pull_request) Successful in 20s
CI / benchmark-publish (pull_request) Has been skipped
CI / quality (pull_request) Successful in 36s
CI / typecheck (pull_request) Successful in 40s
CI / e2e_tests (pull_request) Successful in 36s
CI / build (pull_request) Successful in 36s
CI / security (pull_request) Successful in 1m3s
CI / unit_tests (pull_request) Successful in 3m14s
CI / docker (pull_request) Successful in 9s
CI / integration_tests (pull_request) Successful in 3m49s
CI / coverage (pull_request) Successful in 5m54s
CI / lint (push) Successful in 32s
CI / quality (push) Successful in 33s
CI / typecheck (push) Successful in 45s
CI / benchmark-regression (push) Has been skipped
CI / build (push) Successful in 23s
CI / e2e_tests (push) Successful in 1m0s
CI / security (push) Successful in 1m12s
CI / unit_tests (push) Successful in 3m23s
CI / integration_tests (push) Successful in 3m41s
CI / docker (push) Successful in 1m6s
CI / coverage (push) Successful in 6m15s
CI / benchmark-publish (push) Successful in 20m11s
CI / benchmark-regression (pull_request) Successful in 38m40s

Updated CI pipeline to inject ANTHROPIC_API_KEY and OPENAI_API_KEY
secrets as environment variables during Robot Framework integration
test execution. Added CI setup documentation.

ISSUES CLOSED: #701
This commit was merged in pull request #710.
This commit is contained in:
2026-03-12 01:35:50 +00:00
committed by Forgejo
parent af6340e732
commit ce722ed0ea
2 changed files with 32 additions and 0 deletions
+6
View File
@@ -149,6 +149,12 @@ jobs:
nox -s integration_tests
env:
NOX_DEFAULT_VENV_BACKEND: uv
# LLM API keys required for Robot Framework integration tests.
# These secrets must be configured in Forgejo UI:
# Repository Settings > Actions > Secrets
# See docs/development/ci-cd.md for details.
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
e2e_tests:
runs-on: docker
+26
View File
@@ -244,6 +244,32 @@ sessions use `uv` as the venv backend (`venv_backend="uv"`) and reuse
existing virtualenvs (`reuse_venv=True`) for speed. On CI, each job starts
fresh but `uv` provides fast installs via its built-in caching.
### CI Secrets
Some CI jobs require secrets configured in the Forgejo UI. Secrets are managed
under **Repository Settings > Actions > Secrets** and are automatically masked
in job logs.
| Secret Name | Required By | Purpose |
|-------------|-------------|---------|
| `ANTHROPIC_API_KEY` | `integration_tests` | Anthropic API key for Robot Framework integration tests |
| `OPENAI_API_KEY` | `integration_tests` | OpenAI API key for Robot Framework integration tests |
| `AWS_ACCESS_KEY_ID` | `benchmark-regression`, `benchmark-publish` | AWS credentials for ASV benchmark S3 storage |
| `AWS_SECRET_ACCESS_KEY` | `benchmark-regression`, `benchmark-publish` | AWS credentials for ASV benchmark S3 storage |
| `AWS_DEFAULT_REGION` | `benchmark-regression`, `benchmark-publish` | AWS region for ASV benchmark S3 storage |
| `ASV_S3_BUCKET` | `benchmark-regression`, `benchmark-publish` | S3 bucket name for ASV benchmark storage |
**Unit tests vs. integration tests:**
- **Unit tests** (Behave BDD, `nox -s unit_tests`) do **not** require any API
keys. They test internal logic without calling external services.
- **Integration tests** (Robot Framework, `nox -s integration_tests`) **do**
require real LLM API keys (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`). These
tests exercise end-to-end workflows that interact with live LLM providers.
If the LLM secrets are not configured, integration tests will fail with
authentication errors at runtime.
### Pre-commit Hooks
Pre-commit hooks run automatically on `git commit` and catch most issues before