Skip to content

Commit 0392c20

Browse files
committed
restore cross-version testing
1 parent fa05206 commit 0392c20

File tree

1 file changed

+48
-12
lines changed

1 file changed

+48
-12
lines changed

.github/workflows/all.yml

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,40 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
mongodb_version:
15-
- '4.2'
16-
- '4.4'
17-
- '5.0'
18-
- '6.0'
19-
- '7.0'
20-
- '8.0'
14+
mongodb_versions:
15+
- src: '4.2'
16+
dst:
17+
- '4.2'
18+
- '4.4'
19+
- '5.0'
20+
- '6.0'
21+
22+
- src: '4.4'
23+
dst:
24+
- '4.4'
25+
- '5.0'
26+
- '6.0'
27+
28+
- src: '5.0'
29+
dst:
30+
- '5.0'
31+
- '6.0'
32+
- '7.0'
33+
34+
- src: '6.0'
35+
dst:
36+
- '6.0'
37+
- '7.0'
38+
- '8.0'
39+
40+
- src: '7.0'
41+
dst:
42+
- '7.0'
43+
- '8.0'
44+
45+
- src: '8.0'
46+
dst:
47+
- '8.0'
2148

2249
topology:
2350
- name: replset
@@ -39,8 +66,17 @@ jobs:
3966
- name: Install m
4067
run: npm install -g m mongosh
4168

42-
- name: Activate MongoDB ${{ matrix.mongodb_version }}
43-
run: yes | m ${{ matrix.mongodb_version }}
69+
- name: Install MongoDB versions
70+
run: yes | m ${{ matrix.mongodb_versions.src }} ${{ matrix.mongodb_versions.dst }} stable
71+
72+
- name: Set & save source version
73+
run: m ${{ matrix.mongodb_versions.src }} && dirname $(readlink $(which mongod)) > .srcpath
74+
75+
- name: Set & save destination version
76+
run: m ${{ matrix.mongodb_versions.dst }} && dirname $(readlink $(which mongod)) > .dstpath
77+
78+
- name: Set & save metadata version
79+
run: m stable && dirname $(readlink $(which mongod)) > .metapath
4480

4581
- name: Install mtools
4682
run: pipx install 'mtools[all]'
@@ -59,9 +95,9 @@ jobs:
5995
- name: Start clusters
6096
run: |-
6197
{
62-
echo "mlaunch init --port 27020 --dir src --replicaset ${{ matrix.topology.args }}"
63-
echo "mlaunch init --port 27030 --dir dst --replicaset ${{ matrix.topology.args }}"
64-
echo "mlaunch init --port 27040 --dir meta --replicaset --nodes 1"
98+
echo "mlaunch init --binarypath $(cat .srcpath) --port 27020 --dir src --replicaset ${{ matrix.topology.args }}"
99+
echo "mlaunch init --binarypath $(cat .dstpath) --port 27030 --dir dst --replicaset ${{ matrix.topology.args }}"
100+
echo "mlaunch init --binarypath $(cat .metapath) --port 27040 --dir meta --replicaset --nodes 1"
65101
} | parallel
66102
67103
- name: Test

0 commit comments

Comments
 (0)