From 9aaa91917282aa813e59d48adbdc0cf7ff25a6f4 Mon Sep 17 00:00:00 2001 From: Dylan Hillerbrand Date: Wed, 12 Jun 2024 13:20:40 -0400 Subject: [PATCH] feat: Add github actions for django tests --- .github/workflows/django_tests.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/django_tests.yml diff --git a/.github/workflows/django_tests.yml b/.github/workflows/django_tests.yml new file mode 100644 index 000000000..79fdf3837 --- /dev/null +++ b/.github/workflows/django_tests.yml @@ -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 \ No newline at end of file