MOTOR-1127 Document and test support for MongoDB 7.0 (#209) #334
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
name: Python Tests | |
on: | |
push: | |
pull_request: | |
jobs: | |
pre-commit: | |
name: pre-commit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- uses: pre-commit/action@v2.0.0 | |
with: | |
extra_args: --all-files --hook-stage=manual | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
python-version: ["3.7", "3.11"] | |
fail-fast: false | |
name: CPython ${{ matrix.python-version }}-${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: 'setup.py' | |
- name: Start MongoDB with Custom Options | |
run: | | |
mkdir data | |
mongod --fork --dbpath=$(pwd)/data --logpath=$PWD/mongo.log --setParameter enableTestCommands=1 | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -U pip tox tox-gh-actions setuptools | |
- name: Run tests | |
run: | | |
tox | |
docs: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
cache: 'pip' | |
cache-dependency-path: 'setup.py' | |
- name: Start MongoDB with Custom Options | |
run: | | |
mkdir data | |
mongod --fork --dbpath=$(pwd)/data --logpath=$PWD/mongo.log --setParameter enableTestCommands=1 | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -U pip tox | |
- name: Run docs | |
run: | | |
tox -e py3-sphinx-docs | |
tox -e py3-sphinx-doctest | |
tox -e py3-sphinx-linkcheck |