| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ์์ค์ฝ๋ ์ฒดํฌ์์ | |
| uses: actions/checkout@v4 | |
| - name: Python 3.10 ํ๊ฒฝ ๊ตฌ์ฑ | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| cache: "pip" # ์์กด์ฑ ์ค์น ์๋ ๊ฐ์ | |
| - name: ์์กด์ฑ ๋ฐ ๊ฐ๋ฐ ๋๊ตฌ ์ค์น | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install ruff mypy pytest pytest-cov | |
| - name: ์ฝ๋ ์คํ์ผ ๋ฐ ๋ฆฐํธ ๊ฒ์ฌ (Ruff) | |
| run: ruff check . | |
| - name: ์ ์ ํ์ ๊ฒ์ฌ (MyPy) | |
| run: mypy src/ --ignore-missing-imports | |
| - name: ํ ์คํธ ์คํ (ํตํฉ ํ ์คํธ ์๋ Skip ํฌํจ) | |
| run: pytest tests/ -v | |
| - name: ํ ์คํธ ์ปค๋ฒ๋ฆฌ์ง ๋ฆฌํฌํธ ์์ฑ | |
| run: pytest --cov=src --cov-fail-under=5 | |
| - name: ๋ฏธ์ฌ์ฉ ์ฝ๋ ๊ฒ์ฌ (Vulture) | |
| run: | | |
| pip install vulture | |
| vulture src/ --min-confidence 80 |