@@ -13,9 +13,6 @@ defaults:
13
13
run :
14
14
shell : bash -eux {0}
15
15
16
- env :
17
- MONGODB_VERSION : " 7.0"
18
-
19
16
jobs :
20
17
static :
21
18
runs-on : ubuntu-latest
@@ -55,18 +52,16 @@ jobs:
55
52
- uses : extractions/setup-just@v2
56
53
- name : Start MongoDB on Linux
57
54
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\" }]})"
55
+ uses : supercharge/mongodb-github-action@1.12.0
56
+ with :
57
+ mongodb-version : 8.0
58
+ mongodb-replica-set : test-rs
64
59
- name : Start MongoDB on MacOS
65
60
if : ${{ startsWith(runner.os, 'macOS') }}
66
61
run : |
67
62
brew tap mongodb/brew
68
- brew install mongodb/brew/mongodb-community@${MONGODB_VERSION}
69
- brew services start mongodb-community@${MONGODB_VERSION}
63
+ brew install mongodb/brew/mongodb-community@7.0
64
+ brew services start mongodb-community@7.0
70
65
- name : Start MongoDB on Windows
71
66
if : ${{ startsWith(runner.os, 'Windows') }}
72
67
shell : powershell
77
72
net start MongoDB
78
73
- run : just install
79
74
- run : just test
80
- - name : Run unit tests with minimum dependency versions
81
- run : |
82
- uv sync --python=${{ matrix.python-version }} --resolution=lowest-direct
83
- just tests
75
+
76
+ build-min :
77
+ runs-on : ubuntu-latest
78
+ steps :
79
+ - uses : actions/checkout@v4
80
+ with :
81
+ persist-credentials : false
82
+ fetch-depth : 0
83
+ - name : Install uv
84
+ uses : astral-sh/setup-uv@v5
85
+ with :
86
+ enable-cache : true
87
+ python-version : " 3.9"
88
+ - uses : extractions/setup-just@v2
89
+ - name : Install uv
90
+ uses : astral-sh/setup-uv@v5
91
+ with :
92
+ enable-cache : true
93
+ python-version : " 3.9"
94
+ - uses : extractions/setup-just@v2
95
+ - uses : supercharge/mongodb-github-action@1.12.0
96
+ with :
97
+ mongodb-version : 4.0
98
+ mongodb-replica-set : test-rs
99
+ - name : Run unit tests with minimum dependency versions
100
+ run : |
101
+ uv sync --python="3.9" --resolution=lowest-direct
102
+ just tests
0 commit comments