Skip to content

fix: Fix the resuming of MongoDB change streams in log-based replication mode #84

fix: Fix the resuming of MongoDB change streams in log-based replication mode

fix: Fix the resuming of MongoDB change streams in log-based replication mode #84

Workflow file for this run

name: Test tap-mongodb
on:
push:
branches:
- main
pull_request:
branches:
- main
types:
- opened
- edited
- reopened
- synchronize
jobs:
pre-commit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- 3.8
- 3.9
- '3.10'
- 3.11
- 3.12
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: poetry install
- name: Run pre-commit checks
uses: pre-commit/[email protected]
smoke-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- 3.8
- 3.9
- '3.10'
- 3.11
- 3.12
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Install meltano
run: pipx install meltano
- name: Meltano install
run: meltano install
- name: Smoke test
run: meltano invoke tap-mongodb --about
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mongo-version:
- 4.4
- 5.0
python-version:
- 3.8
- 3.9
- '3.10'
- 3.11
- 3.12
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: poetry install
- name: Install mongosh
run: |
sudo apt-get update
sudo apt-get install -y wget gnupg
wget -qO - https://www.mongodb.org/static/pgp/server-${{ matrix.mongo-version }}.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/${{ matrix.mongo-version }} multiverse" \
| sudo tee /etc/apt/sources.list.d/mongodb-org-${{ matrix.mongo-version }}.list
sudo apt-get update
sudo apt-get install -y mongodb-mongosh
- name: Confirm mongosh install
run: |
mongosh --version
- name: Start Databases
env:
MONGODB_VERSION: ${{ matrix.mongo-version}}
run: |
docker-compose -f compose.yaml up -d
- name: Wait for mongo to be available
run: |
echo "###### Waiting for localhost:27117 instance startup"
until mongosh --host localhost:27117 --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)' &>/dev/null; do
printf '.'
sleep 1
done
echo "###### Working localhost:27117 instance found"
- name: Test with pytest
run: poetry run pytest