Skip to content

Commit

Permalink
[BREAK] Removed support of MongoDB 3.4; Deprecated MongoDB 3.6 and 4.0 (
Browse files Browse the repository at this point in the history
  • Loading branch information
ostjen committed Sep 21, 2021
1 parent 3e9fdbe commit 9500244
Show file tree
Hide file tree
Showing 6 changed files with 89,082 additions and 39,506 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/build_and_test.yml
Expand Up @@ -117,13 +117,6 @@ jobs:

- run: meteor npm run translation-check

- name: Launch MongoDB
uses: wbari/start-mongoDB@v0.2
with:
mongoDBVersion: "4.0"

- run: meteor npm run testunit

- run: meteor npm run typecheck

- name: Build Storybook to sanity check components
Expand Down Expand Up @@ -192,7 +185,7 @@ jobs:
strategy:
matrix:
node-version: ["12.22.1"]
mongodb-version: ["3.4", "3.6", "4.0", "4.2"]
mongodb-version: ["3.6", "4.0", "4.2", "4.4","5.0"]

steps:
- name: Launch MongoDB
Expand Down Expand Up @@ -249,7 +242,10 @@ jobs:
run: |
npm install
- name: Test
- name: Unit Test
run: npm run testunit

- name: E2E Test
env:
TEST_MODE: "true"
MONGO_URL: mongodb://localhost:27017/rocketchat
Expand Down
32 changes: 28 additions & 4 deletions app/models/server/models/Sessions.js
Expand Up @@ -20,10 +20,6 @@ export const aggregates = {
day: { $lte: day },
}],
},
}, {
$sort: {
_id: 1,
},
}, {
$project: {
userId: 1,
Expand Down Expand Up @@ -51,6 +47,10 @@ export const aggregates = {
time: { $sum: '$time' },
sessions: { $sum: 1 },
},
}, {
$sort: {
time: -1,
},
}, {
$group: {
_id: {
Expand All @@ -70,6 +70,10 @@ export const aggregates = {
},
},
},
}, {
$sort: {
_id: 1,
},
}, {
$project: {
_id: 0,
Expand Down Expand Up @@ -183,6 +187,10 @@ export const aggregates = {
$sum: '$time',
},
},
}, {
$sort: {
time: -1,
},
}, {
$group: {
_id: 1,
Expand Down Expand Up @@ -312,6 +320,10 @@ export const aggregates = {
$sum: '$devices.time',
},
},
}, {
$sort: {
time: -1,
},
}, {
$project: {
_id: 0,
Expand Down Expand Up @@ -348,6 +360,10 @@ export const aggregates = {
$sum: '$devices.time',
},
},
}, {
$sort: {
time: -1,
},
}, {
$project: {
_id: 0,
Expand Down Expand Up @@ -384,6 +400,10 @@ export const aggregates = {
$sum: '$devices.time',
},
},
}, {
$sort: {
time: -1,
},
}, {
$project: {
_id: 0,
Expand Down Expand Up @@ -421,6 +441,10 @@ export const aggregates = {
$sum: '$devices.time',
},
},
}, {
$sort: {
time: -1,
},
}, {
$project: {
_id: 0,
Expand Down

0 comments on commit 9500244

Please sign in to comment.