Guide users to mongosync’s embedded verifier. #530
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- '*' | |
tags-ignore: | |
- '*' | |
pull_request: | |
jobs: | |
basics: | |
strategy: | |
fail-fast: false | |
matrix: | |
# versions are: source, destination | |
mongodb_versions: | |
- [ '4.2', '4.2' ] | |
- [ '4.2', '4.4' ] | |
- [ '4.2', '5.0' ] | |
- [ '4.2', '6.0' ] | |
- [ '4.4', '4.4' ] | |
- [ '4.4', '5.0' ] | |
- [ '4.4', '6.0' ] | |
- [ '5.0', '5.0' ] | |
- [ '5.0', '6.0' ] | |
- [ '5.0', '7.0' ] | |
- [ '6.0', '6.0' ] | |
- [ '6.0', '7.0' ] | |
- [ '6.0', '8.0' ] | |
- [ '7.0', '7.0' ] | |
- [ '7.0', '8.0' ] | |
- [ '8.0', '8.0' ] | |
topology: | |
- name: replset | |
srcConnStr: mongodb://localhost:27020,localhost:27021,localhost:27022 | |
dstConnStr: mongodb://localhost:27030,localhost:27031,localhost:27032 | |
- name: replset-to-sharded | |
dstArgs: --sharded 2 | |
srcConnStr: mongodb://localhost:27020,localhost:27021,localhost:27022 | |
dstConnStr: mongodb://localhost:27030 | |
- name: sharded | |
srcArgs: --sharded 2 | |
dstArgs: --sharded 2 | |
srcConnStr: mongodb://localhost:27020 | |
dstConnStr: mongodb://localhost:27030 | |
# There seems no good reason to test on other OSes … ? | |
runs-on: ubuntu-latest | |
name: ${{ matrix.mongodb_versions[0] }} to ${{ matrix.mongodb_versions[1] }}, ${{ matrix.topology.name }} | |
steps: | |
- run: uname -a | |
- run: ldconfig -p | |
- run: lsb_release -a | |
# Servers 4.4 and 5.0 need libcrypto.so.1.1, which predates Ubuntu 24’s | |
# default libcrypto. | |
- run: sudo apt update && sudo apt install -y libssl1.1 | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Fetch Go ${{ matrix.go_version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Install m and mtools | |
run: |- | |
{ | |
echo npm install -g m | |
echo pipx install 'mtools[all]' | |
} | parallel | |
- name: Install MongoDB ${{ matrix.mongodb_versions[0] }} (source) | |
run: yes | m ${{ matrix.mongodb_versions[0] }} && dirname $(readlink $(which mongod)) > .srcpath | |
- name: Install MongoDB ${{ matrix.mongodb_versions[1] }} (destination) | |
run: yes | m ${{ matrix.mongodb_versions[1] }} && dirname $(readlink $(which mongod)) > .dstpath | |
- name: Install latest stable MongoDB (metadata) | |
run: yes | m stable && dirname $(readlink $(which mongod)) > .metapath | |
- name: Build | |
run: ./build.sh | |
- name: Start clusters | |
run: |- | |
{ | |
echo mlaunch init --binarypath $(cat .srcpath) --port 27020 --dir src --replicaset ${{ matrix.topology.srcArgs }} | |
echo mlaunch init --binarypath $(cat .dstpath) --port 27030 --dir dst --replicaset ${{ matrix.topology.dstArgs }} | |
echo mlaunch init --binarypath $(cat .metapath) --port 27040 --dir meta --replicaset --nodes 1 | |
} | parallel | |
- name: Test | |
run: go test -v ./... -race | |
env: | |
MVTEST_SRC: ${{matrix.topology.srcConnStr}} | |
MVTEST_DST: ${{matrix.topology.dstConnStr}} | |
MVTEST_META: mongodb://localhost:27040 |