Skip to content

Commit 913ef85

Browse files
committed
Add legacy build jobs for Python 3.7, 3.8, and 3.9 in CI workflows
1 parent 9c6418b commit 913ef85

2 files changed

Lines changed: 66 additions & 2 deletions

File tree

.github/workflows/python-test-linux.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,44 @@ on:
1010
branches: [ "main" ]
1111

1212
jobs:
13+
build-legacy:
14+
runs-on: ubuntu-20.04
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version: ["3.7", "3.8", "3.9"]
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v3
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
python -m pip install flake8 pytest build
30+
- name: Lint with flake8
31+
run: |
32+
# stop the build if there are Python syntax errors or undefined names
33+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
34+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
35+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
36+
- name: Build package
37+
run: |
38+
python -m build
39+
pip install dist/*.whl
40+
- name: Test with pytest
41+
run: |
42+
python -m pip install typing-extensions
43+
pytest
44+
1345
build:
1446
runs-on: ubuntu-latest
1547
strategy:
1648
fail-fast: false
1749
matrix:
18-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
50+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1951

2052
steps:
2153
- uses: actions/checkout@v3

.github/workflows/python-test-macos.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,44 @@ on:
1010
branches: [ "main" ]
1111

1212
jobs:
13+
build-legacy:
14+
runs-on: macos-15-intel
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version: ["3.7", "3.8", "3.9"]
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v3
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
python -m pip install flake8 pytest build
30+
- name: Lint with flake8
31+
run: |
32+
# stop the build if there are Python syntax errors or undefined names
33+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
34+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
35+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
36+
- name: Build package
37+
run: |
38+
python -m build
39+
pip install dist/*.whl
40+
- name: Test with pytest
41+
run: |
42+
python -m pip install typing-extensions
43+
pytest
44+
1345
build:
1446
runs-on: macos-latest
1547
strategy:
1648
fail-fast: false
1749
matrix:
18-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
50+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1951

2052
steps:
2153
- uses: actions/checkout@v3

0 commit comments

Comments
 (0)