Skip to content

Commit 44d5c04

Browse files
committed
PCSM-234: Add MongoDB version matrix to E2E tests and consolidate scripts
- Add build matrix for MongoDB 6.0, 7.0, and 8.0 versions - Replace deprecated .github/workflows/{rs,sh}/ scripts with hack/{rs,sh}/ - Fix replset teardown bug (was incorrectly using sh/compose.yml) - Remove obsolete workflow script directories (20 files)
1 parent ce70f31 commit 44d5c04

File tree

21 files changed

+25
-534
lines changed

21 files changed

+25
-534
lines changed

.github/workflows/e2etests.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,17 @@ permissions:
88

99
jobs:
1010
replset:
11+
name: ReplicaSet (MongoDB ${{ matrix.mongo_version }})
1112
runs-on: ubuntu-latest
1213

14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
mongo_version: ["6.0", "7.0", "8.0"]
18+
19+
env:
20+
MONGO_VERSION: ${{ matrix.mongo_version }}
21+
1322
steps:
1423
- name: Checkout code
1524
uses: actions/checkout@v3
@@ -38,7 +47,8 @@ jobs:
3847
3948
- name: Start source and target ReplicaSet clusters
4049
run: |
41-
.github/workflows/rs/run
50+
chmod +x hack/rs/run.sh hack/util
51+
hack/rs/run.sh
4252
4353
- name: Build the project
4454
run: |
@@ -55,11 +65,20 @@ jobs:
5565
5666
- name: Teardown Docker Compose
5767
if: always()
58-
run: docker compose -f .github/workflows/sh/compose.yml down
68+
run: docker compose -f hack/rs/compose.yml down
5969

6070
sharded:
71+
name: Sharded (MongoDB ${{ matrix.mongo_version }})
6172
runs-on: ubuntu-latest
6273

74+
strategy:
75+
fail-fast: false
76+
matrix:
77+
mongo_version: ["6.0", "7.0", "8.0"]
78+
79+
env:
80+
MONGO_VERSION: ${{ matrix.mongo_version }}
81+
6382
steps:
6483
- name: Checkout code
6584
uses: actions/checkout@v3
@@ -84,11 +103,12 @@ jobs:
84103
85104
- name: Update hosts file
86105
run: |
87-
echo "127.0.0.1 src-mongos src-cfg0 src-rs00 src-rs01 tgt-mongos tgt-cfg0 tgt-rs00 tgt-rs01" | sudo tee -a /etc/hosts
106+
echo "127.0.0.1 src-mongos src-cfg0 src-rs00 src-rs01 src-rs10 src-rs20 tgt-mongos tgt-cfg0 tgt-rs00 tgt-rs01 tgt-rs10 tgt-rs20" | sudo tee -a /etc/hosts
88107
89108
- name: Start source and target clusters
90109
run: |
91-
.github/workflows/sh/run
110+
chmod +x hack/sh/run.sh hack/util
111+
hack/sh/run.sh
92112
93113
- name: Build the project
94114
run: |
@@ -105,4 +125,4 @@ jobs:
105125
106126
- name: Teardown Docker Compose
107127
if: always()
108-
run: docker compose -f .github/workflows/sh/compose.yml down
128+
run: docker compose -f hack/sh/compose.yml down

.github/workflows/rs/compose.yml

Lines changed: 0 additions & 122 deletions
This file was deleted.

.github/workflows/rs/mongo/scripts/deprioritize.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/rs/mongo/scripts/rs0.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/workflows/rs/mongo/scripts/rs1.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/workflows/rs/run

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/rs/util

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)