Skip to content

Commit

Permalink
Set environment variables for GitHub Actions workflow
Browse files Browse the repository at this point in the history
Environment variables `RAILS_ENV` and `DATABASE_URL` are now set earlier in the GitHub Actions workflow. This change provides better organization and makes sure that necessary variables are set before running the subsequent tasks.
  • Loading branch information
brunto committed Jan 24, 2024
1 parent 709a63c commit 2e68df3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432/pia_test
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -32,9 +34,6 @@ jobs:
- name: Set up database schema
run: bin/rails db:schema:load
- name: Run tests
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/pia_test
RAILS_ENV: test
run: bin/rails test

lint:
Expand Down

0 comments on commit 2e68df3

Please sign in to comment.