Add GitHub Actions workflow for Python package#154
Add GitHub Actions workflow for Python package#154AKB0700 wants to merge 5 commits intoDeepLcom:mainfrom
Conversation
This workflow installs Python dependencies, runs tests, and lints code with multiple Python versions.
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub Actions workflow intended to run linting and tests for the Python package across multiple Python versions on pushes and pull requests to main.
Changes:
- Introduces
.github/workflows/python-package.ymlwith a Python version matrix (3.9–3.11). - Adds steps to install dependencies, run
flake8, and runpytest.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/python-package.yml
Outdated
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v3 |
There was a problem hiding this comment.
This uses actions/setup-python@v3, which is quite old and may rely on deprecated Node runtimes in GitHub Actions. Update to a currently supported major version (e.g., @v5) to avoid workflow breakage as GitHub deprecates older Node versions.
| uses: actions/setup-python@v3 | |
| uses: actions/setup-python@v5 |
AKB0700
left a comment
There was a problem hiding this comment.
感謝您新增 GitHub Actions 工作流程!此拉取請求設定了關鍵的持續整合步驟(安裝依賴項、執行測試及程式碼檢查),並跨越矩陣在多個 Python 版本上執行這些步驟,這使得長期維護和品質提升帶來顯著的效益。
幾個小建議/疑問(不一定會阻礙細節):
我們是否也希望在pull_request時觸發此流程(若目前僅在push時執行),以確保所有PR接受CI檢查?
考慮新增緩存機制(如pip緩存),使持續整合流程更快且更穩定。
如果專案在pyproject.toml/ setup.cfg/文件中明確定義了支援的Python版本範圍, 建議將工作流程矩陣與該支援政策配對,蘇格蘭遺漏或使用未支援的版本。
總的來說,這看起來很棒——感謝您的貢獻!
|
感謝您新增 GitHub Actions 工作流程!此拉取請求設定了關鍵的持續整合步驟(安裝依賴項、執行測試及程式碼檢查),並跨越矩陣在多個 Python 版本上執行這些步驟,這使得長期維護和品質提升帶來顯著的效益。 幾個小建議/疑問(不一定會阻礙細節): 我們是否也希望在pull_request時觸發此流程(若目前僅在push時執行),以確保所有PR接受CI檢查? |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot open a new pull request to apply changes based on the comments in this thread |
This workflow installs Python dependencies, runs tests, and lints code with multiple Python versions.