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:
parent
069d183b35
commit
70bed98e06
3 changed files with 19 additions and 0 deletions
9
.github/workflows/pr-test.yml
vendored
9
.github/workflows/pr-test.yml
vendored
|
|
@ -195,6 +195,15 @@ jobs:
|
||||||
- "3021:3021"
|
- "3021:3021"
|
||||||
- "3022:3022"
|
- "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:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go: [1.24]
|
go: [1.24]
|
||||||
|
|
|
||||||
9
.github/workflows/unit-test.yml
vendored
9
.github/workflows/unit-test.yml
vendored
|
|
@ -202,6 +202,15 @@ jobs:
|
||||||
- "3021:3021"
|
- "3021:3021"
|
||||||
- "3022:3022"
|
- "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:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go: [1.24]
|
go: [1.24]
|
||||||
|
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -51,3 +51,4 @@ openapi/*.md
|
||||||
coverage.html
|
coverage.html
|
||||||
agent/assistant/hook/*.test.md
|
agent/assistant/hook/*.test.md
|
||||||
agent/search/TODO.md
|
agent/search/TODO.md
|
||||||
|
agent/search/job-logs.txt
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue