From 2ae176609e2c6ba51357b1cebb28f9c2cd17c043 Mon Sep 17 00:00:00 2001 From: Hepheir Date: Fri, 5 Dec 2025 16:06:02 +0900 Subject: [PATCH 1/4] chore: add Pytest(`pytest-django`) to requirements for testing support --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 6e5370e..a2901f6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ django djangorestframework +pytest-django From 8005ee7177e8400d16c5491d82fc55ec0d72b433 Mon Sep 17 00:00:00 2001 From: Hepheir Date: Fri, 5 Dec 2025 10:25:08 +0900 Subject: [PATCH 2/4] chore: add initial configuration for pytest settings --- pytest.ini | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 pytest.ini diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..98e07e2 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +DJANGO_SETTINGS_MODULE = app.settings From 0e9627625790586d231c5f73aadba72edc1a73af Mon Sep 17 00:00:00 2001 From: Hepheir Date: Fri, 5 Dec 2025 15:41:35 +0900 Subject: [PATCH 3/4] chore: add VSCode settings for Python testing configuration --- .vscode/settings.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..eac3606 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "python.analysis.extraPaths": [ + "${workspaceFolder}/app" + ], + "python.testing.cwd": "${workspaceFolder}/app/", + "python.testing.pytestEnabled": true, + "python.testing.unittestEnabled": false +} \ No newline at end of file From c99cdb5f76ea26b20ef67b4fe72708ae16dc3a6a Mon Sep 17 00:00:00 2001 From: Hepheir Date: Fri, 5 Dec 2025 15:48:20 +0900 Subject: [PATCH 4/4] chore: add Django CI (testing) workflow for continuous integration --- .github/workflows/django.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/django.yml diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml new file mode 100644 index 0000000..aac3458 --- /dev/null +++ b/.github/workflows/django.yml @@ -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 + 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