-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
235537d
commit 339cff6
Showing
1 changed file
with
8 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 | ||
|
@@ -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] | ||
|