Skip to content

Commit 754667d

Browse files
committed
address review
1 parent 7337646 commit 754667d

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/test-python.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ defaults:
1313
run:
1414
shell: bash -eux {0}
1515

16+
env:
17+
MIN_PYTHON: "3.9"
18+
MIN_MONGODB: "4.0"
19+
MAX_MONGODB: "8.0"
20+
1621
jobs:
1722
static:
1823
runs-on: ubuntu-latest
@@ -54,14 +59,14 @@ jobs:
5459
if: ${{ startsWith(runner.os, 'Linux') }}
5560
uses: supercharge/mongodb-github-action@1.12.0
5661
with:
57-
mongodb-version: 8.0
62+
mongodb-version: ${{ env.MAX_MONGODB }}
5863
mongodb-replica-set: test-rs
5964
- name: Start MongoDB on MacOS
6065
if: ${{ startsWith(runner.os, 'macOS') }}
6166
run: |
6267
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}
6570
- name: Start MongoDB on Windows
6671
if: ${{ startsWith(runner.os, 'Windows') }}
6772
shell: powershell
@@ -84,19 +89,19 @@ jobs:
8489
uses: astral-sh/setup-uv@v5
8590
with:
8691
enable-cache: true
87-
python-version: "3.9"
92+
python-version: ${{ env.MIN_PYTHON }}
8893
- uses: extractions/setup-just@v2
8994
- name: Install uv
9095
uses: astral-sh/setup-uv@v5
9196
with:
9297
enable-cache: true
93-
python-version: "3.9"
98+
python-version: ${{ env.MIN_PYTHON }}
9499
- uses: extractions/setup-just@v2
95100
- uses: supercharge/mongodb-github-action@1.12.0
96101
with:
97-
mongodb-version: 4.0
102+
mongodb-version: ${{ env.MIN_MONGODB }}
98103
mongodb-replica-set: test-rs
99104
- name: Run unit tests with minimum dependency versions
100105
run: |
101-
uv sync --python="3.9" --resolution=lowest-direct
106+
uv sync --python=${MIN_PYTHON} --resolution=lowest-direct
102107
just test

0 commit comments

Comments
 (0)