@@ -14,7 +14,9 @@ defaults:
14
14
shell : bash -eux {0}
15
15
16
16
env :
17
- MONGODB_VERSION : " 7.0"
17
+ MIN_PYTHON : " 3.9"
18
+ MIN_MONGODB : " 4.0"
19
+ MAX_MONGODB : " 8.0"
18
20
19
21
jobs :
20
22
static :
@@ -55,18 +57,16 @@ jobs:
55
57
- uses : extractions/setup-just@v2
56
58
- name : Start MongoDB on Linux
57
59
if : ${{ startsWith(runner.os, 'Linux') }}
58
- run : |
59
- docker run --name mongodb -p 27017:27017 -e MONGO_INITDB_DATABASE=unittest --detach mongo:${MONGODB_VERSION} mongod --replSet rs --setParameter transactionLifetimeLimitSeconds=5
60
- until docker exec --tty mongodb mongosh 127.0.0.1:27017 --eval "db.runCommand({ ping: 1 })"; do
61
- sleep 1
62
- done
63
- sudo docker exec --tty mongodb mongosh 127.0.0.1:27017 --eval "rs.initiate({\"_id\":\"rs\",\"members\":[{\"_id\":0,\"host\":\"127.0.0.1:27017\" }]})"
60
+ uses :
supercharge/[email protected]
61
+ with :
62
+ mongodb-version : ${{ env.MAX_MONGODB }}
63
+ mongodb-replica-set : test-rs
64
64
- name : Start MongoDB on MacOS
65
65
if : ${{ startsWith(runner.os, 'macOS') }}
66
66
run : |
67
67
brew tap mongodb/brew
68
- brew install mongodb/brew/mongodb-community@${MONGODB_VERSION }
69
- brew services start mongodb-community@${MONGODB_VERSION }
68
+ brew install mongodb/brew/mongodb-community@${MAX_MONGODB }
69
+ brew services start mongodb-community@${MAX_MONGODB }
70
70
- name : Start MongoDB on Windows
71
71
if : ${{ startsWith(runner.os, 'Windows') }}
72
72
shell : powershell
77
77
net start MongoDB
78
78
- run : just install
79
79
- run : just test
80
+
81
+ build-min :
82
+ runs-on : ubuntu-latest
83
+ steps :
84
+ - uses : actions/checkout@v4
85
+ with :
86
+ persist-credentials : false
87
+ fetch-depth : 0
88
+ - name : Install uv
89
+ uses : astral-sh/setup-uv@v5
90
+ with :
91
+ enable-cache : true
92
+ python-version : ${{ env.MIN_PYTHON }}
93
+ - uses : extractions/setup-just@v2
94
+ - name : Install uv
95
+ uses : astral-sh/setup-uv@v5
96
+ with :
97
+ enable-cache : true
98
+ python-version : ${{ env.MIN_PYTHON }}
99
+ - uses : extractions/setup-just@v2
100
+ -
uses :
supercharge/[email protected]
101
+ with :
102
+ mongodb-version : ${{ env.MIN_MONGODB }}
103
+ mongodb-replica-set : test-rs
104
+ - name : Run unit tests with minimum dependency versions
105
+ run : |
106
+ uv sync --python=${MIN_PYTHON} --resolution=lowest-direct
107
+ just test
0 commit comments