Skip to content

Commit

Permalink
Try reloading database config
Browse files Browse the repository at this point in the history
  • Loading branch information
elektronaut committed Nov 26, 2024
1 parent 235537d commit 339cff6
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
POSTGRES_DB: pages_test

name: Build
Expand Down Expand Up @@ -62,8 +64,8 @@ jobs:
ports:
- 5432:5432
env:
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
POSTGRES_USER: ${{ env.PGUSER }}
POSTGRES_PASSWORD: ${{ env.PGPASSWORD }}
POSTGRES_DB: ${{ env.POSTGRES_DB }}
options: >-
--health-cmd pg_isready
Expand All @@ -85,16 +87,11 @@ jobs:
- name: Create database
env:
RAILS_ENV: test
PGHOST: localhost
PGUSER: ${{ env.POSTGRES_USER }}
PGPASSWORD: ${{ env.POSTGRES_PASSWORD }}
run: |
bundle exec rake db:migrate
- name: Reload database config
run: psql ${{ env.POSTGRES_DB }} -c "SELECT cfgname FROM pg_ts_config;"
- name: Run tests
env:
PGHOST: localhost
PGUSER: ${{ env.POSTGRES_USER }}
PGPASSWORD: ${{ env.POSTGRES_PASSWORD }}
run: bundle exec rspec
- name: Send results to Code Climate
uses: paambaati/[email protected]
Expand Down

0 comments on commit 339cff6

Please sign in to comment.