File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Postgres memory store tests
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ postgres-tests :
11+ runs-on : ubuntu-latest
12+ services :
13+ postgres :
14+ image : postgres:15
15+ env :
16+ POSTGRES_USER : postgres
17+ POSTGRES_PASSWORD : postgres
18+ POSTGRES_DB : distill_test
19+ ports :
20+ - 5432:5432
21+ options : >-
22+ --health-cmd "pg_isready -U postgres -d distill_test"
23+ --health-interval 5s --health-timeout 5s --health-retries 5
24+
25+ steps :
26+ - name : Checkout
27+ uses : actions/checkout@v4
28+
29+ - name : Set up Go
30+ uses : actions/setup-go@v4
31+ with :
32+ go-version : ' 1.24'
33+
34+ - name : Wait for Postgres
35+ run : |
36+ for i in {1..10}; do
37+ pg_isready -h localhost -p 5432 -U postgres && break || sleep 2
38+ done
39+
40+ - name : Run tests (with Postgres DSN)
41+ env :
42+ POSTGRES_DSN : postgres://postgres:postgres@localhost:5432/distill_test?sslmode=disable
43+ run : |
44+ go test -tags=postgres ./... -v
You can’t perform that action at this time.
0 commit comments