Skip to content

Commit

Permalink
update db setup for ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Song0180 committed Jan 24, 2024
1 parent 209148a commit eaad89d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ on:
jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:16.1-alpine

env:
POSTGRES_USER: root
POSTGRES_PASSWORD: secret
POSTGRES_DB: simple-bank

options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3

Expand All @@ -20,5 +35,8 @@ jobs:
with:
go-version: '1.21.6'

- name: Run migrations
run: make migrateup

- name: Test
run: make test

0 comments on commit eaad89d

Please sign in to comment.