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
31 changes: 31 additions & 0 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Django CI

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

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actions/setup-python@v3 is an older version. Consider updating to actions/setup-python@v5 which is the latest stable version and provides better support for newer Python versions like 3.13, improved caching, and bug fixes.

Suggested change
uses: actions/setup-python@v3
uses: actions/setup-python@v5

Copilot uses AI. Check for mistakes.
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: |
cd app
python manage.py test
Comment on lines +28 to +31
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI workflow uses Django's built-in test runner (python manage.py test), but this PR configures pytest for local development. This inconsistency means that local tests with pytest might pass while CI tests fail, or vice versa. Consider using pytest in CI as well by changing the test command to pytest and ensuring pytest and pytest-django are installed in the dependencies.

Suggested change
- name: Run Tests
run: |
cd app
python manage.py test
pip install pytest pytest-django
- name: Run Tests
run: |
cd app
pytest

Copilot uses AI. Check for mistakes.
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"python.analysis.extraPaths": [
"${workspaceFolder}/app"
],
"python.testing.cwd": "${workspaceFolder}/app/",
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false
}
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pytest]
DJANGO_SETTINGS_MODULE = app.settings
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
django
djangorestframework
pytest-django