Skip to content
Merged
Show file tree
Hide file tree
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
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Backend CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
ci:
name: Django CI
runs-on: ubuntu-latest

env:
SECRET_KEY: ci-test-secret-key
DB_NAME: task_manager
DB_USER: task_manager_user
DB_PASSWORD: ci-test-db-password
DB_HOST: 127.0.0.1
DB_PORT: 3306

services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: task_manager
MYSQL_USER: task_manager_user
MYSQL_PASSWORD: ci-test-db-password
MYSQL_ROOT_PASSWORD: ci-test-root-password
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -pci-test-root-password"
--health-interval=10s
--health-timeout=5s
--health-retries=5

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip

- name: Install dependencies
run: pip install -r requirements.txt

- name: Check Django configuration
run: python manage.py check

- name: Check migrations
run: python manage.py makemigrations --check --dry-run

- name: Run tests
run: python manage.py test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ __pycache__/

# Virtual environments
.venv/
.env/
venv/
env/
ENV/
Expand Down
7 changes: 3 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ asgiref==3.10.0
Django==5.2.7
django-cors-headers==4.9.0
djangorestframework==3.16.1
djangorestframework_simplejwt==5.5.1
dotenv==0.9.9
djangorestframework-simplejwt==5.5.1
gunicorn==23.0.0
packaging==25.0
PyJWT==2.10.1
PyMySQL==1.1.2
cryptography==3.4.8
python-dotenv==1.1.1
sqlparse==0.5.3
sqlparse==0.5.3
Loading