Skip to content

Commit ed8a2c3

Browse files
committed
Run tests/lint on more versions, cache pip deps
1 parent 647a7c1 commit ed8a2c3

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

.github/workflows/build.yml

+20-12
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,45 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python-version: ["3.7", "3.8"]
16+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1717
os: [macOS-latest, ubuntu-latest, windows-latest]
18-
18+
include:
19+
- python-version: "3.5"
20+
os: ubuntu-latest
21+
- python-version: "3.6"
22+
os: ubuntu-latest
1923
steps:
2024
- name: Checkout
21-
uses: actions/checkout@v1
25+
uses: actions/checkout@v3
2226
- name: Set Up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v1
27+
uses: actions/setup-python@v4
2428
with:
29+
cache: pip
30+
cache-dependency-path: pyproject.toml
2531
python-version: ${{ matrix.python-version }}
2632
- name: Install
2733
run: |
28-
python -m pip install --upgrade pip
29-
make setup
3034
pip install -U .
3135
- name: Test
3236
run: make test
3337

3438
lint:
35-
runs-on: ubuntu-latest
39+
runs-on: ${{ matrix.os }}
40+
strategy:
41+
matrix:
42+
python-version: ["3.10"]
43+
os: [ubuntu-latest]
3644
steps:
3745
- name: Checkout
3846
uses: actions/checkout@v1
3947
- name: Set Up Python
40-
uses: actions/setup-python@v1
48+
uses: actions/setup-python@v4
4149
with:
42-
python-version: "3.8"
50+
cache: pip
51+
cache-dependency-path: pyproject.toml
52+
python-version: ${{ matrix.python-version }}
4353
- name: Install
4454
run: |
45-
python -m pip install --upgrade pip
46-
make setup
47-
pip install -U .
55+
pip install -U .[dev]
4856
- name: Lint
4957
run: make lint

makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ format:
1616

1717
lint:
1818
python -m ufmt check diff_match_patch
19+
python -m mypy -p diff_match_patch
1920

2021
test:
2122
python -m unittest -v diff_match_patch.tests
22-
python -m mypy -p diff_match_patch
2323

2424
clean:
2525
rm -rf build dist html README MANIFEST *.egg-info

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ name = "diff-match-patch"
4646
package = "diff_match_patch"
4747
signed_tags = true
4848
version_file = true
49+
50+
[tool.mypy]
51+
python_version = "3.6"

0 commit comments

Comments
 (0)