Skip to content

[24.12.25 / TASK-71] Refactor - 메인 로직 리팩토링 #35

[24.12.25 / TASK-71] Refactor - 메인 로직 리팩토링

[24.12.25 / TASK-71] Refactor - 메인 로직 리팩토링 #35

Workflow file for this run

name: Test CI
on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
branches:
- main
jobs:
test-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.13.0
- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.8.4
- name: Setup a local virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Define a cache for the virtual environment
uses: actions/cache@v4
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}-${{ runner.os }}
- name: Install dependencies
run: poetry install --with dev
- name: Create .env file
run: |
echo "SECRET_KEY=adsfgdsftrgdfsvdf" >> .env
echo "DEBUG=True" >> .env
echo "DATABASE_URL=sqlite:///db.sqlite3" >> .env
- name: Run migrations
run: poetry run python manage.py migrate
- name: Run Django system check
run: poetry run python manage.py check
- name: Run tests
env:
DJANGO_SETTINGS_MODULE: backoffice.settings.test
run: poetry run pytest -v --full-trace --showlocals --tb=long --capture=no