Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions .github/workflows/deployment-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,32 @@ jobs:
DB_PASSWORD: password
SECRET_BASE_KEY: test_key
RAILS_ENV: production
services:
postgres:
image: postgres
env:
POSTGRES_DB: ${{ env.DB_NAME }}
POSTGRES_USER: ${{ env.DB_USER }}
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }}
Comment on lines +19 to +21
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The env context is not available in the services section of GitHub Actions. The expressions ${{ env.DB_NAME }}, ${{ env.DB_USER }}, and ${{ env.DB_PASSWORD }} will not be interpolated and will result in empty values being passed to the PostgreSQL container.

You should use hardcoded values directly in the service configuration instead.

Suggested change
POSTGRES_DB: ${{ env.DB_NAME }}
POSTGRES_USER: ${{ env.DB_USER }}
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }}
POSTGRES_DB: tess
POSTGRES_USER: tess
POSTGRES_PASSWORD: password

Copilot uses AI. Check for mistakes.
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready"
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: harmon758/postgresql-action@v1
with:
postgresql db: ${DB_NAME}
postgresql user: ${DB_USER}
postgresql password: ${DB_PASSWORD}
name: Set up database

- uses: actions/checkout@v4
name: Set up Ruby

- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
Expand Down
36 changes: 24 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,35 @@ jobs:
DB_PASSWORD: password
SECRET_BASE_KEY: test_key
RAILS_ENV: test
REDIS_TEST_URL: redis://localhost:6456/0
REDIS_TEST_URL: redis://localhost:6379/0
services:
postgres:
image: postgres
env:
POSTGRES_DB: ${{ env.DB_NAME }}
POSTGRES_USER: ${{ env.DB_USER }}
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }}
Comment on lines +20 to +22
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The env context is not available in the services section of GitHub Actions. The expressions ${{ env.DB_NAME }}, ${{ env.DB_USER }}, and ${{ env.DB_PASSWORD }} will not be interpolated and will result in empty values being passed to the PostgreSQL container.

You should use hardcoded values directly in the service configuration instead.

Suggested change
POSTGRES_DB: ${{ env.DB_NAME }}
POSTGRES_USER: ${{ env.DB_USER }}
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }}
POSTGRES_DB: tess
POSTGRES_USER: tess
POSTGRES_PASSWORD: password

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem to be the case, as indicated by the actions running successfully.

ports:
- 5432:5432
options: >-
--health-cmd "pg_isready"
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install imagemagick
- name: Set up database
uses: harmon758/postgresql-action@v1
with:
postgresql db: ${DB_NAME}
postgresql user: ${DB_USER}
postgresql password: ${DB_PASSWORD}
- name: Set up Redis
uses: supercharge/redis-github-action@1.5.0
with:
redis-version: 6
redis-port: 6456
- name: Check out code
uses: actions/checkout@v4
- name: Install Ruby & gems
Expand Down