Skip to content

Commit

Permalink
CI correction
Browse files Browse the repository at this point in the history
  • Loading branch information
ZEZE1020 committed Jan 13, 2025
1 parent 21c0189 commit d540ff2
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 31 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Django CI

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

services:
postgres:
image: postgres:12
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Set up PostgreSQL environment variables
run: echo "Environment variables set"

- name: Apply migrations
run: python manage.py migrate

- name: Run tests
run: python manage.py test
30 changes: 0 additions & 30 deletions .github/workflows/django.yml

This file was deleted.

2 changes: 1 addition & 1 deletion accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from .forms import CustomUserCreationForm, CustomUserChangeForm
from django.shortcuts import render
from django.shortcuts import render
from django import AuthenticationForm
from django.contrib.auth.forms import AuthenticationForm

def home(request):
return render(request, 'home.html')
Expand Down

0 comments on commit d540ff2

Please sign in to comment.