test: add test data directories (testMusic and testCharacters)

This commit is contained in:
2026-05-23 01:06:43 +02:00
parent 92b82da3af
commit 1ada52f5f8
244 changed files with 1225 additions and 26 deletions
+47
View File
@@ -0,0 +1,47 @@
name: Integration Tests
on:
workflow_dispatch: # Manual trigger only
jobs:
integration-test:
runs-on: ubuntu-latest
container:
image: golang:1.25
options: --privileged
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: music_server_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: go mod download
- name: Install testcontainers
run: go install github.com/testcontainers/testcontainers-go@latest
- name: Run integration tests
env:
DB_HOST: postgres
DB_PORT: 5432
DB_USERNAME: testuser
DB_PASSWORD: testpass
DB_NAME: music_server_test
MUSIC_PATH: ./testMusic
CHARACTERS_PATH: ./testCharacters
run: go test -v -timeout 30m ./...