Skip to content

Commit b6c2887

Browse files
committed
Include Python 3.13 and 3.14 to test matrix
1 parent 95e1f9f commit b6c2887

File tree

2 files changed

+118
-104
lines changed

2 files changed

+118
-104
lines changed

.github/workflows/python-ci.yml

Lines changed: 116 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,116 @@
1-
name: Python CI
2-
3-
on:
4-
schedule:
5-
- cron: '0 0 * * *'
6-
push:
7-
branches: [ master ]
8-
paths-ignore:
9-
- '**.md'
10-
pull_request:
11-
branches: [ master ]
12-
13-
workflow_dispatch:
14-
15-
jobs:
16-
test:
17-
runs-on: ${{ matrix.os }}
18-
strategy:
19-
matrix:
20-
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
21-
os: [ windows-latest, macos-latest, ubuntu-latest ]
22-
exclude: # Python < v3.8 does not support Apple Silicon ARM64.
23-
- python-version: "3.5"
24-
os: macos-latest
25-
- python-version: "3.6"
26-
os: macos-latest
27-
- python-version: "3.7"
28-
os: macos-latest
29-
include: # So run those legacy versions on Intel CPUs.
30-
- python-version: "3.5"
31-
os: macos-13
32-
- python-version: "3.6"
33-
os: macos-13
34-
- python-version: "3.7"
35-
os: macos-13
36-
37-
steps:
38-
- uses: actions/checkout@v4
39-
40-
- name: Run tests in Docker for legacy Python
41-
if: matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)
42-
run: |
43-
docker run --rm -v ${{ github.workspace }}:/app -w /app python:${{ matrix.python-version }} bash -c "
44-
pip install --upgrade pip &&
45-
pip install pytest pytest-cov parameterized mock flake8 &&
46-
pip install -r requirements.txt &&
47-
flake8 configcatclient --count --show-source --statistics &&
48-
pytest configcatclienttests
49-
"
50-
51-
- name: Set up Python ${{ matrix.python-version }}
52-
if: ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
53-
uses: actions/setup-python@v5
54-
with:
55-
python-version: ${{ matrix.python-version }}
56-
env:
57-
# Needed on Ubuntu for Python 3.5 build.
58-
PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org"
59-
60-
- name: Install dependencies
61-
if: ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
62-
run: |
63-
python -m pip install --upgrade pip
64-
pip install pytest pytest-cov parameterized mock flake8
65-
pip install -r requirements.txt
66-
67-
- name: Lint with flake8
68-
if: ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
69-
run: |
70-
# Statical analysis
71-
flake8 configcatclient --count --show-source --statistics
72-
73-
- name: Test
74-
if: ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
75-
run: pytest configcatclienttests
76-
77-
78-
coverage:
79-
needs: [ test ]
80-
runs-on: ubuntu-latest
81-
steps:
82-
- uses: actions/checkout@v4
83-
84-
- name: Set up Python
85-
uses: actions/setup-python@v5
86-
with:
87-
python-version: "3.11"
88-
89-
- name: Install dependencies
90-
run: |
91-
python -m pip install --upgrade pip
92-
pip install pytest pytest-cov parameterized mock flake8
93-
pip install -r requirements.txt
94-
95-
- name: Lint with flake8
96-
run: |
97-
# Statical analysis
98-
flake8 configcatclient --count --show-source --statistics
99-
100-
- name: Run coverage
101-
run: pytest --cov=configcatclient configcatclienttests
102-
103-
- name: Upload coverage report
104-
uses: codecov/codecov-action@v3
1+
name: Python CI
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
push:
7+
branches: [master]
8+
paths-ignore:
9+
- "**.md"
10+
pull_request:
11+
branches: [master]
12+
13+
workflow_dispatch:
14+
15+
jobs:
16+
test:
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
python-version:
22+
[
23+
"3.5",
24+
"3.6",
25+
"3.7",
26+
"3.8",
27+
"3.9",
28+
"3.10",
29+
"3.11",
30+
"3.12",
31+
"3.13",
32+
"3.14",
33+
]
34+
os: [windows-latest, macos-latest, ubuntu-latest]
35+
exclude: # Python < v3.8 does not support Apple Silicon ARM64.
36+
- python-version: "3.5"
37+
os: macos-latest
38+
- python-version: "3.6"
39+
os: macos-latest
40+
- python-version: "3.7"
41+
os: macos-latest
42+
include: # So run those legacy versions on Intel CPUs.
43+
- python-version: "3.5"
44+
os: macos-13
45+
- python-version: "3.6"
46+
os: macos-13
47+
- python-version: "3.7"
48+
os: macos-13
49+
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- name: Run tests in Docker for legacy Python
54+
if: matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)
55+
run: |
56+
docker run --rm -v ${{ github.workspace }}:/app -w /app python:${{ matrix.python-version }} bash -c "
57+
pip install --upgrade pip &&
58+
pip install pytest pytest-cov parameterized mock flake8 &&
59+
pip install -r requirements.txt &&
60+
flake8 configcatclient --count --show-source --statistics &&
61+
pytest configcatclienttests
62+
"
63+
64+
- name: Set up Python ${{ matrix.python-version }}
65+
if: ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
66+
uses: actions/setup-python@v5
67+
with:
68+
python-version: ${{ matrix.python-version }}
69+
env:
70+
# Needed on Ubuntu for Python 3.5 build.
71+
PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org"
72+
73+
- name: Install dependencies
74+
if: ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
75+
run: |
76+
python -m pip install --upgrade pip
77+
pip install pytest pytest-cov parameterized mock flake8
78+
pip install -r requirements.txt
79+
80+
- name: Lint with flake8
81+
if: ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
82+
run: |
83+
# Statical analysis
84+
flake8 configcatclient --count --show-source --statistics
85+
86+
- name: Test
87+
if: ${{ !(matrix.os == 'ubuntu-latest' && contains(fromJSON('["3.5","3.6","3.7"]'), matrix.python-version)) }}
88+
run: pytest configcatclienttests
89+
90+
coverage:
91+
needs: [test]
92+
runs-on: ubuntu-latest
93+
steps:
94+
- uses: actions/checkout@v4
95+
96+
- name: Set up Python
97+
uses: actions/setup-python@v5
98+
with:
99+
python-version: "3.11"
100+
101+
- name: Install dependencies
102+
run: |
103+
python -m pip install --upgrade pip
104+
pip install pytest pytest-cov parameterized mock flake8
105+
pip install -r requirements.txt
106+
107+
- name: Lint with flake8
108+
run: |
109+
# Statical analysis
110+
flake8 configcatclient --count --show-source --statistics
111+
112+
- name: Run coverage
113+
run: pytest --cov=configcatclient configcatclienttests
114+
115+
- name: Upload coverage report
116+
uses: codecov/codecov-action@v3

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ def parse_requirements(filename):
3838
'Programming Language :: Python :: 3.10',
3939
'Programming Language :: Python :: 3.11',
4040
'Programming Language :: Python :: 3.12',
41+
'Programming Language :: Python :: 3.13',
42+
'Programming Language :: Python :: 3.14',
4143
'Topic :: Software Development',
4244
'Topic :: Software Development :: Libraries',
4345
],

0 commit comments

Comments
 (0)