-
Notifications
You must be signed in to change notification settings - Fork 8
69 lines (58 loc) · 1.91 KB
/
integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Integration Test
on:
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
jobs:
test:
name: Django API Test
runs-on: ubuntu-latest
steps:
- name: 캐시 무효화
uses: actions/cache@v4
with:
path: |
~/.cache/pypoetry
~/.cache/pip
key: ${{ runner.os }}-poetry-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-poetry-
- name: 코드 Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Poetry 설치
run: |
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
- name: 의존성 설치
run: |
poetry install --no-root
shell: bash
- name: 코드 스타일 검사 (isort)
run: |
poetry run isort . --check-only
- name: 코드 스타일 검사 (black)
run: |
poetry run black . --check
- name: 임시 데이터베이스 Migration
env:
DJANGO_SETTINGS_MODULE: "config.settings"
DJANGO_DEBUG_MODE: true
UPCY_SECRET_KEY: "test123123123123123123123" # 진짜 SECRET 키 아닙니다.
run: |
poetry run python manage.py migrate
- name: Django 테스트 실행
env:
DJANGO_SETTINGS_MODULE: "config.settings"
DJANGO_DEBUG_MODE: true
UPCY_SECRET_KEY: "test123123123123123123123" # 진짜 SECRET 키 아닙니다.
run: |
poetry run python manage.py test users.tests.user_tests # User 모듈 테스트 실행
poetry run python manage.py test users.tests.reformer_tests # Reformer 모듈 테스트 실행
poetry run python manage.py test # 그 이외 모듈 테스트 실행