Skip to content

Commit 5034937

Browse files
committed
GitGuardian check fixed, remove secret
1 parent aaaa0cf commit 5034937

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/go-test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Go Unit Tests
22

3+
# User-management tests need Postgres.
4+
# Repository secret TEST_POSTGRES_PASSWORD
5+
36
on:
47
push:
58
branches: [ main ]
@@ -18,7 +21,7 @@ jobs:
1821
image: postgres:16-alpine
1922
env:
2023
POSTGRES_USER: altsuite
21-
POSTGRES_PASSWORD: altsuite
24+
POSTGRES_PASSWORD: ${{ secrets.TEST_POSTGRES_PASSWORD }}
2225
POSTGRES_DB: altsuite
2326
ports:
2427
- 5432:5432
@@ -36,7 +39,7 @@ jobs:
3639
go-version: '1.24'
3740
- name: Run unit tests and generate coverage
3841
env:
39-
DATABASE_URL: postgres://altsuite:altsuite@localhost:5432/altsuite?sslmode=disable
42+
DATABASE_URL: postgres://altsuite:${{ secrets.TEST_POSTGRES_PASSWORD }}@localhost:5432/altsuite?sslmode=disable
4043
run: |
4144
cd api
4245
go test -v -race -coverprofile=coverage.out -coverpkg=./... ./... | tee test_output.txt

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ go run .
130130
- **Development**: Go 1.21+, Node.js 18+
131131
- **Production**: Linux system (systemd recommended)
132132

133+
## CI
134+
135+
The Go test workflow runs user-management tests against Postgres. Add a repository secret **`TEST_POSTGRES_PASSWORD`**
133136

134137
## Contributors
135138

deploy/altsuite-postgres/docker-compose.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# Postgres container for AltSuite user management.
2-
# Run from this directory: docker compose up -d
3-
# Then set DATABASE_URL when starting AltSuite, e.g.:
4-
# DATABASE_URL=postgres://altsuite:YOUR_PASSWORD@localhost:5432/altsuite?sslmode=disable
2+
# Run from this directory:
3+
# export POSTGRES_PASSWORD='your-secure-password'
4+
# docker compose up -d
5+
# Then set DATABASE_URL when starting AltSuite:
6+
# DATABASE_URL=postgres://altsuite:your-secure-password@127.0.0.1:5432/altsuite?sslmode=disable
57

68
services:
79
postgres:
810
image: postgres:16-alpine
911
restart: unless-stopped
1012
environment:
1113
POSTGRES_USER: altsuite
12-
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-altsuite}
14+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
1315
POSTGRES_DB: altsuite
1416
ports:
1517
- "127.0.0.1:5432:5432"

0 commit comments

Comments
 (0)