Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: try without postgres options #7

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Django CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
REDIS_HOST: "redis"
REDIS_PORT: "6379"
REDIS_URL: "redis://redis:6379"

MEILISEARCH_DISABLED: "1"
MEILISEARCH_HOST: "meilisearch"
MEILISEARCH_PORT: "7700"
MEILISEARCH_URL: "http://meilisearch:7700"
MEILISEARCH_V_1_MASTER_KEY: "meilisearch"

DATABASE: postgres
POSTGRES_V_1_PASSWORD: postgres
POSTGRES_DB_NAME: githubactions
POSTGRES_USER: postgres
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432

DJANGO_V_1_SECRET_KEY: "django"

GOOGLE_OAUTH_DISABLED: "1"
GOOGLE_OAUTH_CLIENT_ID: ""
GOOGLE_OAUTH_CLIENT_SECRET: ""
FRONTEND_CALLBACK_URL: ""

CLOUDFLARE_TURNSTILE_DISABLED: "1"
CLOUDFLARE_TURNSTILE_SECRET_KEY: ""

EMAIL_HOST: ""
EMAIL_HOST_USER: ""
EMAIL_HOST_PASSWORD: ""

CLIENT_BASE_URL: "http://127.0.0.1:5173/"

ADMINS: '[{"name": "Joe", "email": "[email protected]"}]'

CORS_ALLOWED_ORIGINS: "http://127.0.0.1:5173 http://localhost:5173"
ALLOWED_HOSTS: "localhost 127.0.0.1 [::1]"
ADMIN_URL_SEGMENT: "githubactions"
DEBUG: 1

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ['3.10']

services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: githubactions
ports:
- 5432:5432
options: >-
--health-cmd pg_isready --health-interval 10s
--health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Migrations
run: |
python manage.py migrate
- name: Run Tests
run: |
python manage.py test
Loading