fix: set DATABASE_HOST at job level for all steps
This commit is contained in:
parent
d1591d3e6c
commit
24cfbc44af
1 changed files with 8 additions and 15 deletions
|
|
@ -13,6 +13,10 @@ jobs:
|
|||
test-exunit:
|
||||
name: Run ExUnit Tests
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
MIX_ENV: test
|
||||
DATABASE_HOST: postgres
|
||||
DATABASE_PORT: 5432
|
||||
|
||||
services:
|
||||
postgres:
|
||||
|
|
@ -69,22 +73,18 @@ jobs:
|
|||
|
||||
- name: Compile (warnings as errors)
|
||||
run: mix compile --warnings-as-errors
|
||||
env:
|
||||
MIX_ENV: test
|
||||
DATABASE_HOST: postgres
|
||||
DATABASE_PORT: 5432
|
||||
|
||||
- name: Run tests
|
||||
run: mix test
|
||||
env:
|
||||
MIX_ENV: test
|
||||
DATABASE_HOST: postgres
|
||||
DATABASE_PORT: 5432
|
||||
|
||||
test-e2e:
|
||||
name: Run E2E Tests
|
||||
runs-on: ubuntu-22.04
|
||||
needs: test-exunit
|
||||
env:
|
||||
MIX_ENV: dev
|
||||
DATABASE_HOST: postgres
|
||||
DATABASE_PORT: 5432
|
||||
|
||||
services:
|
||||
postgres:
|
||||
|
|
@ -160,17 +160,10 @@ jobs:
|
|||
|
||||
- name: Setup database
|
||||
run: mix ecto.setup
|
||||
env:
|
||||
MIX_ENV: dev
|
||||
DATABASE_HOST: postgres
|
||||
DATABASE_PORT: 5432
|
||||
|
||||
- name: Start Phoenix server in background
|
||||
run: mix phx.server &
|
||||
env:
|
||||
MIX_ENV: dev
|
||||
DATABASE_HOST: postgres
|
||||
DATABASE_PORT: 5432
|
||||
SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE || 'dev_secret_key_base_for_testing_only_min_64_chars_required_here' }}
|
||||
PHX_HOST: localhost
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue