fix(ci): provision postgres for backend tests
This commit is contained in:
parent
2c28c4cba2
commit
6b6e8ac4e4
1 changed files with 19 additions and 0 deletions
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
|
|
@ -43,6 +43,22 @@ jobs:
|
|||
|
||||
backend:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
postgres:
|
||||
image: pgvector/pgvector:pg17
|
||||
env:
|
||||
POSTGRES_DB: multica
|
||||
POSTGRES_USER: multica
|
||||
POSTGRES_PASSWORD: multica
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
--health-cmd "pg_isready -U multica -d multica"
|
||||
--health-interval 5s
|
||||
--health-timeout 5s
|
||||
--health-retries 20
|
||||
env:
|
||||
DATABASE_URL: postgres://multica:multica@localhost:5432/multica?sslmode=disable
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
|
@ -56,5 +72,8 @@ jobs:
|
|||
- name: Build
|
||||
run: cd server && go build ./...
|
||||
|
||||
- name: Run migrations
|
||||
run: cd server && go run ./cmd/migrate up
|
||||
|
||||
- name: Test
|
||||
run: cd server && go test ./...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue