Skip to content

Commit 1bb37fb

Browse files
authored
Add support for python 3.7 (#9)
* 使用setup-pdm准备环境,并增加python 3.7版本验证 * 部分包最新版本需要>=3.8,因此需要降低依赖版本 * 还是使用pdm来运行pytest * fix pytest cov * bump version Support python 3.7
1 parent 4ff96c9 commit 1bb37fb

3 files changed

Lines changed: 263 additions & 173 deletions

File tree

‎.github/workflows/python-package.yml‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,17 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
18+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
1919

2020
steps:
2121
- uses: actions/checkout@v4
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v4
22+
- name: Set up PDM with python ${{ matrix.python-version }}
23+
uses: pdm-project/setup-pdm@v4
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626
- name: Install dependencies
2727
run: |
28-
python -m pip install --upgrade pip
29-
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
30-
pdm install -d
28+
pdm sync -d -G dev
3129
- name: Lint with ruff
3230
run: |
3331
pdm run ruff check src
@@ -36,4 +34,4 @@ jobs:
3634
pdm run mypy src --strict
3735
- name: Test with pytest
3836
run: |
39-
pdm run pytest --durations=5 --cov=. --cov-report term -vv
37+
pdm run pytest --durations=5 --cov=. --cov-fail-under=90 --cov-report term -vv

0 commit comments

Comments
 (0)