update zh readme #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 測試 Python 套件 | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 設定 Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: 安裝相依套件 | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
pip install -e . | |
- name: 檢查環境 | |
run: | | |
echo "注意: Arduino CLI 需由用戶自行安裝" | |
echo "測試環境資訊:" | |
python --version | |
pip list | |
- name: 執行測試 (若有) | |
run: | | |
if [ -d "tests" ]; then | |
pytest | |
else | |
echo "沒有找到測試目錄,跳過測試階段" | |
fi |