-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add github actions for django tests
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: django-tests | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
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: 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 |