Skip to content

Commit 0b2c00e

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

File tree

2 files changed

+117
-104
lines changed

2 files changed

+117
-104
lines changed

.github/workflows/python-ci.yml

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