Add MongoDB Service to CI Workflows

- Introduced a MongoDB service in both `pr-test.yml` and `unit-test.yml` workflows to facilitate database testing.
- Configured MongoDB with environment variables for root username, password, and database name, enhancing test environment setup.
- Updated `.gitignore` to exclude job logs for search agents, ensuring cleaner repository management.
This commit is contained in:
Max 2025-12-15 11:30:09 +08:00
parent 069d183b35
commit 70bed98e06
3 changed files with 19 additions and 0 deletions

View file

@ -195,6 +195,15 @@ jobs:
- "3021:3021"
- "3022:3022"
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: [1.24]

View file

@ -202,6 +202,15 @@ jobs:
- "3021:3021"
- "3022:3022"
mongodb:
image: mongo:6.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
MONGO_INITDB_DATABASE: test
strategy:
matrix:
go: [1.24]

1
.gitignore vendored
View file

@ -51,3 +51,4 @@ openapi/*.md
coverage.html
agent/assistant/hook/*.test.md
agent/search/TODO.md
agent/search/job-logs.txt