<aside>
</aside>
π― μ΄λ² μ±ν° λͺ©ν
- μ§μμ ν΅ν©(CI) κ°λ
λ° μ€μμ± μ΄ν΄
- CI μμ€ν
(μ: GitHub Actions)μμ Nox μΈμ
μ€ν μ΄μ μ΄ν΄ (μ€μ κ°μν, μΌκ΄μ± μ μ§)
- GitHub Actions μν¬νλ‘μ° YAML νμΌ κΈ°λ³Έ ꡬ쑰 λ° μ£Όμ μμ(
on
, jobs
, strategy
, steps
) μ΄ν΄
- CI νκ²½ Nox μ€μΉ λ° μ μλ Nox μΈμ
(
nox -s ...
) μ€ν ꡬ체μ λ°©λ² μκΈ°
- μ½λ λ³κ²½ μ(push, pull request) μλ ν
μ€νΈ/κ²μ¦ μν CI μν¬νλ‘μ° μ€μ λ°©λ² μ΄ν΄
- Nox μ¬μ©μΌλ‘ λ‘컬/CI νκ²½ μ€ν μΌκ΄μ± μ¦λ λ° κ°λ°μ κ²½ν κ°μ ν¨κ³Ό μ΄ν΄
π» κ°μ μ 체 μ½λ λ° νλ‘μ νΈ κ΅¬μ‘° (GitHub Actions μν¬νλ‘μ° μΆκ°!)
νλ‘μ νΈ κ΅¬μ‘°:
graph TD
A(my-pytest-project) --> FOLDER_GITHUB(.github);
FOLDER_GITHUB --> FOLDER_WORKFLOWS(workflows);
FOLDER_WORKFLOWS --> FILE_CI_YML(ci.yml GitHub Actions μν¬νλ‘μ° νμΌ);
A --> B(.venv);
A --> C(mycalc);
A --> D(tests);
A --> E(pytest.ini);
A --> F(noxfile.py);
A --> G(requirements-dev.txt);
A --> H(pyproject.toml);
C --> ...;
D --> ...;
style FOLDER_GITHUB fill:#ddd, stroke:#333;
style FOLDER_WORKFLOWS fill:#eee, stroke:#333;
style FILE_CI_YML fill:#ddf, stroke:#333;
style B fill:#eee,stroke:#333,stroke-dasharray: 5 5;
style C fill:#ccf,stroke:#333;
style D fill:#cfc,stroke:#333;
style E fill:#fef,stroke:#333;
style F fill:#ffc,stroke:#333;
style G fill:#eee,stroke:#333;
style H fill:#eef,stroke:#333;
.github/workflows/ci.yml
(μ νμΌ):(GitHub μ μ₯μ .github/workflows/
λλ ν 리μ μμΉ μ μλ μΈμ/μ€ν)
π λ΄μ©
1. μ§μμ ν΅ν©(CI)μ΄λ? π
- μ§μμ ν΅ν©(Continuous Integration, CI): μ½λ λ³κ²½ μ¬νμ μμ£Ό μ€μ μ μ₯μμ ν΅ν©, μλ λΉλ/ν
μ€νΈ μνμΌλ‘ λ¬Έμ μ‘°κΈ° λ°κ²¬/ν΄κ²° κ°λ° νλν°μ€.
- ν΅μ¬ μμ΄λμ΄:
- μ¦μ μ½λ ν΅ν© (ν루 μ¬λ¬ λ²).
- ν΅ν© μ μλνλ λΉλ/ν
μ€νΈ νλ‘μΈμ€ μ€ν.
- μ½λ μ€λ₯, ν΅ν© λ¬Έμ , ν
μ€νΈ μ€ν¨ μ¦μ κ°μ§.
- κ°λ°μμκ² λΉ λ₯Έ νΌλλ°±, μ μ μμ μ λ.
- μ₯μ :
- μ€λ₯ μ‘°κΈ° λ°κ²¬/ν΄κ²°: μμ λΉμ© μ κ°.
- κ°λ° μμ°μ± ν₯μ: μλ μμ
κ°μ, κ°λ° μ§μ€.
- μ½λ νμ§ ν₯μ: μλ ν
μ€νΈ/κ²μ¬λ‘ νμ§ μ μ§.
- ν νμ
κ°ν: ν¬λͺ
ν ν΅ν©/κ²μ¦ κ³Όμ , μ λ’° μ¦μ§.
- λΉ λ₯΄κ³ μμ μ μΈ λ¦΄λ¦¬μ€: λ°°ν¬ κ°λ₯ μν μ½λ μ μ§ (CD κΈ°λ°).
- CI μλ²/μλΉμ€: GitHub Actions, GitLab CI/CD, Jenkins, CircleCI λ±. (λ³Έ κ°μ: GitHub Actions μμ)