Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 92b170b

Browse files
Fix tests failing in CI/CD (#166)
Pin Ubuntu version to 22.04 for all workflows. This fixes the issue with tests failing on Python 3.7 due to Python 3.7 not being available on the latest Ubuntu OS (see here: actions/setup-python#962). Pinning the OS version on **all** workflows should limit unforeseen errors due to an a new latest OS. Update Python version used in lint/publish workflows to 13. This is the latest available for Ubuntu 22.04. Add Python 3.12 version to tests for CI. **Note:** Tests fail when testing with Python 3.13. This will be fixed in an upcoming PR. Add Python 3.12/3.13 to list of supported versions.
1 parent fa37782 commit 92b170b

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [push, pull_request]
55
jobs:
66
run-hooks:
77
name: Run pre-commit hooks
8-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-22.04
99

1010
steps:
1111
- name: Check out Git repository
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Python
1515
uses: actions/setup-python@v3
1616
with:
17-
python-version: 3.9
17+
python-version: 3.13
1818

1919
- name: Install Python dependencies
2020
run: pip install pre-commit

.github/workflows/pythonpublish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ on:
66

77
jobs:
88
deploy:
9-
runs-on: ubuntu-latest
9+
runs-on: ubuntu-22.04
1010
steps:
1111
- uses: actions/checkout@v3
1212
- name: Set up Python
1313
uses: actions/setup-python@v4
1414
with:
15-
python-version: '3.x'
15+
python-version: '3.13'
1616
- name: Install dependencies
1717
run: |
1818
python -m pip install --upgrade pip

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ on: [push, pull_request]
55
jobs:
66
test:
77
name: test
8-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-22.04
99
strategy:
1010
matrix:
11-
python-version: ['3.7', '3.9']
11+
python-version: ['3.7', '3.9', '3.12']
1212
steps:
1313
- uses: actions/checkout@v3
1414
- uses: actions/setup-python@v3

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ classifiers = [
2323
"Programming Language :: Python :: 3.9",
2424
"Programming Language :: Python :: 3.10",
2525
"Programming Language :: Python :: 3.11",
26+
"Programming Language :: Python :: 3.12",
27+
"Programming Language :: Python :: 3.13",
2628
]
2729

2830
dependencies = ["numpy >= 1.21", "typing_extensions"]

0 commit comments

Comments
 (0)