H-419: run auto-assignment concurrency on PostgreSQL (#77)
Co-authored-by: Rogee <rogee@ipao.vip>
This commit is contained in:
@@ -31,6 +31,36 @@ jobs:
|
||||
working-directory: backend
|
||||
run: go vet ./...
|
||||
|
||||
backend-postgres:
|
||||
name: Backend (PostgreSQL concurrency)
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
env:
|
||||
POSTGRES_DB: gochat_test
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
--health-cmd "pg_isready -U postgres -d gochat_test"
|
||||
--health-interval 5s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: backend/go.mod
|
||||
cache-dependency-path: backend/go.sum
|
||||
- name: Test auto-assignment concurrency
|
||||
working-directory: backend
|
||||
env:
|
||||
GOCHAT_TEST_DB: postgres
|
||||
GOCHAT_TEST_DB_URL: postgres://postgres:postgres@localhost:5432/gochat_test?sslmode=disable
|
||||
run: go test ./internal/autoassignment -run '^TestAssignmentServiceOnlyOneConcurrentWorkerWinsPostgres$' -count=3
|
||||
|
||||
frontend:
|
||||
name: Frontend Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user