REP-5306 Migrate integration tests to use externally-provisioned clusters. #235
Workflow file for this run
This file contains hidden or 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: | |
| mongodb_versions: | |
| - src: '4.2' | |
| dst: | |
| - '4.2' | |
| - '4.4' | |
| - '5.0' | |
| - '6.0' | |
| - src: '4.4' | |
| dst: | |
| - '4.4' | |
| - '5.0' | |
| - '6.0' | |
| - src: '5.0' | |
| dst: | |
| - '5.0' | |
| - '6.0' | |
| - '7.0' | |
| - src: '6.0' | |
| dst: | |
| - '6.0' | |
| - '7.0' | |
| - '8.0' | |
| - src: '7.0' | |
| dst: | |
| - '7.0' | |
| - '8.0' | |
| - src: '8.0' | |
| dst: | |
| - '8.0' | |
| topology: | |
| - name: replset | |
| srcConnStr: mongodb://localhost:27020,localhost:27021,localhost:27022 | |
| dstConnStr: mongodb://localhost:27030,localhost:27031,localhost:27032 | |
| - name: sharded | |
| args: --sharded 2 | |
| srcConnStr: mongodb://localhost:27020 | |
| dstConnStr: mongodb://localhost:27030 | |
| # There seems no good reason to test on other OSes … ? | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install packages | |
| run: ${{ matrix.os.setup }} | |
| - name: Install m | |
| run: npm install -g m mongosh | |
| - name: Install MongoDB versions | |
| run: yes | m ${{ matrix.mongodb_versions.src }} ${{ matrix.mongodb_versions.dst }} stable | |
| - name: Set & save source version | |
| run: m ${{ matrix.mongodb_versions.src }} && dirname $(readlink $(which mongod)) > .srcpath | |
| - name: Set & save destination version | |
| run: m ${{ matrix.mongodb_versions.dst }} && dirname $(readlink $(which mongod)) > .dstpath | |
| - name: Set & save metadata version | |
| run: m stable && dirname $(readlink $(which mongod)) > .metapath | |
| - name: Install mtools | |
| run: pipx install 'mtools[all]' | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Fetch Go ${{ matrix.go_version }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: stable | |
| - name: Build | |
| run: go build main/migration_verifier.go | |
| - name: Start clusters | |
| run: |- | |
| { | |
| echo "mlaunch init --binarypath $(cat .srcpath) --port 27020 --dir src --replicaset ${{ matrix.topology.args }}" | |
| echo "mlaunch init --binarypath $(cat .dstpath) --port 27030 --dir dst --replicaset ${{ matrix.topology.args }}" | |
| echo "mlaunch init --binarypath $(cat .metapath) --port 27040 --dir meta --replicaset --nodes 1" | |
| } | parallel | |
| - name: Test | |
| run: go test -v ./... | |
| env: | |
| MVTEST_SRC: ${{matrix.topology.srcConnStr}} | |
| MVTEST_DST: ${{matrix.topology.dstConnStr}} | |
| MVTEST_META: mongodb://localhost:27040 |