-
Notifications
You must be signed in to change notification settings - Fork 0
단위 테스트 실행 환경 구성 #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0e96276
c99cdb5
2ae1766
8005ee7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | ||||||||||||||||||||
| 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
|
||||||||||||||||||||
| - name: Run Tests | |
| run: | | |
| cd app | |
| python manage.py test | |
| pip install pytest pytest-django | |
| - name: Run Tests | |
| run: | | |
| cd app | |
| pytest |
| 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 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [pytest] | ||
| DJANGO_SETTINGS_MODULE = app.settings |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| django | ||
| djangorestframework | ||
| pytest-django |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
actions/setup-python@v3is an older version. Consider updating toactions/setup-python@v5which is the latest stable version and provides better support for newer Python versions like 3.13, improved caching, and bug fixes.