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 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 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 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