Skip to content

Commit 7e60128

Browse files
committed
Add postgres health check and attempt to not create database
1 parent 19813e1 commit 7e60128

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/rails_ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@ jobs:
2828
env:
2929
POSTGRES_USER: rails
3030
POSTGRES_PASSWORD: password
31+
options: >-
32+
--health-cmd pg_isready
33+
--health-interval 10s
34+
--health-timeout 500ms
35+
--health-retries 15
3136
steps:
3237
- uses: actions/checkout@v4
3338
- name: Install dependencies
3439
uses: ./.github/actions/setup-action
35-
- name: Create database
36-
run: bundle exec rails db:create:all
3740
- name: Set up database schema
38-
run: bundle exec rails db:schema:load
41+
run: bin/rails db:schema:load
3942
- name: Run tests
4043
run: bundle exec rspec
4144

0 commit comments

Comments
 (0)