fix: use PostgreSQL service container in CI instead of Testcontainers
CI — Build, Lint & Security Scan / backend (push) Failing after 48s
CI — Build, Lint & Security Scan / frontend (push) Failing after 1m7s
CI — Build, Lint & Security Scan / image-scan (push) Has been skipped
CI — Build, Lint & Security Scan / secrets-scan (push) Failing after 42s
Deploy to TrueNAS / deploy (push) Successful in 2m52s
CI — Build, Lint & Security Scan / backend (push) Failing after 48s
CI — Build, Lint & Security Scan / frontend (push) Failing after 1m7s
CI — Build, Lint & Security Scan / image-scan (push) Has been skipped
CI — Build, Lint & Security Scan / secrets-scan (push) Failing after 42s
Deploy to TrueNAS / deploy (push) Successful in 2m52s
Testcontainers can't network properly on TrueNAS act-runner (host network vs bridge). Added postgres:16-alpine service container to CI workflow and made AbstractIntegrationTest conditionally skip Testcontainers when CI_POSTGRES_URL env var is present.
This commit is contained in:
@@ -19,6 +19,20 @@ jobs:
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
backend:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
env:
|
||||
POSTGRES_DB: cannamanage_test
|
||||
POSTGRES_USER: test
|
||||
POSTGRES_PASSWORD: test
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -34,6 +48,10 @@ jobs:
|
||||
|
||||
- name: Maven test
|
||||
run: ./mvnw test -B -T 1C
|
||||
env:
|
||||
CI_POSTGRES_URL: jdbc:postgresql://localhost:5432/cannamanage_test
|
||||
CI_POSTGRES_USER: test
|
||||
CI_POSTGRES_PASSWORD: test
|
||||
|
||||
- name: OWASP Dependency-Check (SCA)
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user