@@ -13,6 +13,11 @@ defaults:
13
13
run :
14
14
shell : bash -eux {0}
15
15
16
+ env :
17
+ MIN_PYTHON : " 3.9"
18
+ MIN_MONGODB : " 4.0"
19
+ MAX_MONGODB : " 8.0"
20
+
16
21
jobs :
17
22
static :
18
23
runs-on : ubuntu-latest
@@ -54,14 +59,14 @@ jobs:
54
59
if : ${{ startsWith(runner.os, 'Linux') }}
55
60
uses : supercharge/mongodb-github-action@1.12.0
56
61
with :
57
- mongodb-version : 8.0
62
+ mongodb-version : ${{ env.MAX_MONGODB }}
58
63
mongodb-replica-set : test-rs
59
64
- name : Start MongoDB on MacOS
60
65
if : ${{ startsWith(runner.os, 'macOS') }}
61
66
run : |
62
67
brew tap mongodb/brew
63
- brew install mongodb/brew/mongodb-community@7.0
64
- brew services start mongodb-community@7.0
68
+ brew install mongodb/brew/mongodb-community@${MAX_MONGODB}
69
+ brew services start mongodb-community@${MAX_MONGODB}
65
70
- name : Start MongoDB on Windows
66
71
if : ${{ startsWith(runner.os, 'Windows') }}
67
72
shell : powershell
@@ -84,19 +89,19 @@ jobs:
84
89
uses : astral-sh/setup-uv@v5
85
90
with :
86
91
enable-cache : true
87
- python-version : " 3.9 "
92
+ python-version : ${{ env.MIN_PYTHON }}
88
93
- uses : extractions/setup-just@v2
89
94
- name : Install uv
90
95
uses : astral-sh/setup-uv@v5
91
96
with :
92
97
enable-cache : true
93
- python-version : " 3.9 "
98
+ python-version : ${{ env.MIN_PYTHON }}
94
99
- uses : extractions/setup-just@v2
95
100
- uses : supercharge/mongodb-github-action@1.12.0
96
101
with :
97
- mongodb-version : 4.0
102
+ mongodb-version : ${{ env.MIN_MONGODB }}
98
103
mongodb-replica-set : test-rs
99
104
- name : Run unit tests with minimum dependency versions
100
105
run : |
101
- uv sync --python="3.9" --resolution=lowest-direct
106
+ uv sync --python=${MIN_PYTHON} --resolution=lowest-direct
102
107
just test
0 commit comments