Skip to content

Commit

Permalink
Test with postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkRunWu committed Dec 14, 2023
1 parent e8776e7 commit 05051e7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,27 @@ on:
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11.5
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-go@v4
with:
go-version: stable
- name: Test
run: go test ./...
env:
TEST_PAGESHIP_DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable

2 changes: 2 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ services:
image: postgres:11.5
volumes:
- data:/data
ports:
- "5432:5432"

controller:
image: ghcr.io/oursky/pageship-controller
Expand Down

0 comments on commit 05051e7

Please sign in to comment.