-
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
Conversation
4b1f51d to
ca7ca06
Compare
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.
Pull request overview
This PR configures pytest-based unit testing environment for VSCode integration and adds a GitHub Actions CI workflow for automated testing. The setup enables developers to use VSCode's in-editor test GUI with pytest while also establishing CI/CD for the Django project.
Key Changes:
- Adds pytest configuration with Django settings module
- Configures VSCode Python extension for pytest integration
- Sets up GitHub Actions workflow for CI testing on the develop branch
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pytest.ini | Configures pytest with Django settings module (app.settings) |
| .vscode/settings.json | Enables VSCode pytest integration with proper Python paths and testing configuration |
| .github/workflows/django.yml | Adds CI workflow for Python 3.9-3.13 with automated testing on push/PR to develop branch |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Run Tests | ||
| run: | | ||
| cd app | ||
| python manage.py test |
Copilot
AI
Dec 5, 2025
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 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.
| - name: Run Tests | |
| run: | | |
| cd app | |
| python manage.py test | |
| pip install pytest pytest-django | |
| - name: Run Tests | |
| run: | | |
| cd app | |
| pytest |
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v3 |
Copilot
AI
Dec 5, 2025
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@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.
| uses: actions/setup-python@v3 | |
| uses: actions/setup-python@v5 |
ca7ca06 to
c99cdb5
Compare
Pytest를 사용하여 VSCode 에디터에서 인에디터 단위테스트 GUI 를 쉽게 이용할 수 있게 하였습니다.