Skip to content

Commit 753c64e

Browse files
chore: update ci workflow to cache mongo and update min node and mongodb versions
1 parent cdaddae commit 753c64e

4 files changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
node-version: [18.x, 20.x]
18+
node-version: [20.x, 22.x]
1919

2020
steps:
2121
- uses: actions/checkout@v4
@@ -30,6 +30,14 @@ jobs:
3030
node-version: ${{ matrix.node-version }}
3131
cache: 'pnpm'
3232

33+
- name: Cache MongoDB binaries
34+
uses: actions/cache@v4
35+
with:
36+
path: ~/.cache/mongodb-binaries
37+
key: mongodb-binaries-${{ runner.os }}-${{ hashFiles('**/package.json') }}
38+
restore-keys: |
39+
mongodb-binaries-${{ runner.os }}-
40+
3341
- name: Install dependencies
3442
run: pnpm install --frozen-lockfile
3543

@@ -42,5 +50,10 @@ jobs:
4250
- name: Build
4351
run: pnpm build
4452

53+
- name: Pre-download MongoDB binaries
54+
run: |
55+
node -e "const { MongoMemoryServer } = require('mongodb-memory-server'); MongoMemoryServer.create().then(m => m.stop());"
56+
working-directory: packages/mizzle-orm
57+
4558
- name: Test
4659
run: pnpm test

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"packageManager": "pnpm@10.1.0",
2525
"engines": {
26-
"node": ">=18",
26+
"node": ">=20",
2727
"pnpm": ">=9"
2828
}
2929
}

packages/mizzle-orm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pnpm add @mizzle-dev/orm mongodb
2525
yarn add @mizzle-dev/orm mongodb
2626
```
2727

28-
**Requirements:** Node.js 18+ and MongoDB 5.0+
28+
**Requirements:** Node.js 20+ and MongoDB driver 6.0+
2929

3030
## Quick Start
3131

packages/mizzle-orm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@
7272
"vitest": "^4.0.12"
7373
},
7474
"peerDependencies": {
75-
"mongodb": ">=5.0.0"
75+
"mongodb": ">=6.0.0"
7676
}
7777
}

0 commit comments

Comments
 (0)