Skip to content

Commit

Permalink
Add env file handling:
Browse files Browse the repository at this point in the history
  • Loading branch information
dchiller committed Jun 12, 2024
1 parent 9aaa919 commit adacdb4
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/django_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,25 @@ on:
jobs:
run-tests:
runs-on: ubuntu-latest
env:
POSTGRES_DB: test_cantusdb
POSTGRES_USER: test_user
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
PROJECT_ENVIRONMENT: PRODUCTION
CANTUSDB_STATIC_ROOT: /some/path
CANTUSDB_MEDIA_ROOT: /some/path
CANTUSDB_HOST: somehost
CANTUSDB_SECRET_KEY: "hereisakey1234"
POSTGRES_PASSWORD: woahagreatpasswordabc
AWS_EMAIL_HOST_USER: test_user
AWS_EMAIL_HOST_PASSWORD: test_password
steps:
- uses: actions/checkout@v3
- run: mkdir -p config/envs
- uses: SpicyPizza/[email protected]
with:
envkey_POSTGRES_DB: test_cantusdb
envkey_POSTGRES_USER: test_user
envkey_POSTGRES_HOST: postgres
envkey_POSTGRES_PORT: 5432
envkey_PROJECT_ENVIRONMENT: PRODUCTION
envkey_CANTUSDB_STATIC_ROOT: /some/path
envkey_CANTUSDB_MEDIA_ROOT: /some/path
envkey_CANTUSDB_HOST: somehost
envkey_CANTUSDB_SECRET_KEY: "hereisakey1234"
envkey_POSTGRES_PASSWORD: woahagreatpasswordabc
envkey_AWS_EMAIL_HOST_USER: test_user
envkey_AWS_EMAIL_HOST_PASSWORD: test_password
directory: config/envs
filename: dev_env
- run: docker compose -f docker-compose-development.yml build
- run: docker compose -f docker-compose-development.yml up -d
- run: docker compose -f docker-compose-development.yml exec -T django python manage.py test main_app.tests

0 comments on commit adacdb4

Please sign in to comment.