Skip to content

Commit 9e635cd

Browse files
author
ly
committed
Expand CI coverage for Python compatibility
1 parent 4b6fb26 commit 9e635cd

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
- ubuntu-latest
2222
- macos-latest
2323
python-version:
24+
- "3.9"
25+
- "3.10"
2426
- "3.11"
2527

2628
steps:
@@ -32,6 +34,10 @@ jobs:
3234
with:
3335
python-version: ${{ matrix.python-version }}
3436

37+
- name: Install tomli for Python < 3.11
38+
if: ${{ matrix.python-version != '3.11' }}
39+
run: python3 -m pip install tomli
40+
3541
- name: Run unit tests
3642
run: python3 -m unittest discover -s tests -p 'test*.py' -v
3743

tests/test_project_contracts.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ def test_ci_workflow_runs_full_unittest_suite(self):
9999
self.assertIn("workflow_dispatch:", content)
100100
self.assertIn("ubuntu-latest", content)
101101
self.assertIn("macos-latest", content)
102+
self.assertIn('- "3.9"', content)
103+
self.assertIn('- "3.10"', content)
104+
self.assertIn('- "3.11"', content)
105+
self.assertIn("Install tomli for Python < 3.11", content)
106+
self.assertIn("matrix.python-version != '3.11'", content)
107+
self.assertIn("python3 -m pip install tomli", content)
102108
self.assertIn("python3 -m unittest discover -s tests -p 'test*.py' -v", content)
103109
self.assertIn("Run smoke validation", content)
104110
self.assertTrue("make smoke" in content or "./scripts/ci-smoke.sh" in content)

0 commit comments

Comments
 (0)